Forums
New posts
Articles
Product Reviews
Policies
FAQ
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Menu
Log in
Register
Install the app
Install
Forums
macOS & iOS Developer Playground
macOS - Development and Darwin
Core Audio AudioQueueEnqueueBufferWithParameters
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="nacho4d" data-source="post: 738590" data-attributes="member: 62897"><p>Hi.</p><p>(I have to say that I am quite new to Core Audio.)</p><p>I am trying to use AudioQueueEnqueueBufferWithParameters function so I can enqueue buffers corresponding a certain time, like song navigation. </p><p>(suppose a have a GUI time line, (for example UISlider) and I want to be able to go to any audio's position in time, so I can enqueue the corresponding buffers to that time and enqueue them to be played -> As far as I understand this can be accomplished by using AudioQueueEnqueueBufferWithParameters)</p><p></p><p>For example in iPhone speakHere project > AudioPlayer.m > playbackCall function</p><p>there is </p><p></p><p>[CODE]AudioQueueEnqueueBuffer (</p><p> inAudioQueue,</p><p> bufferReference,</p><p> ([ player packetDescriptions ] ? numPackets : 0),</p><p> [ player packetDescriptions ]</p><p> );[/CODE]</p><p></p><p>but I want to have more control so I would use</p><p></p><p>[CODE]UInt32 inTrimFramesAtStart, inTrimFramesAtEnd;</p><p>AudioQueueTimelineRef myOutTimeline; </p><p>AudioQueueCreateTimeline(inAudioQueue, &myOutTimeline); //is this correct?</p><p></p><p>AudioQueueEnqueueBufferWithParameters(</p><p> inAudioQueue,</p><p> bufferReference,</p><p> ([player packetDescriptions] ? numPackets : 0),</p><p> [player packetDescriptions],</p><p> inTrimFramesAtStart, //???????</p><p> inTrimFramesAtEnd, //???????</p><p> 0, //since I am not passing any parameter</p><p> NULL, //since I am not setting any parameter</p><p> NULL, //ASAP</p><p> &myOuTimeline, //something tells me that is not good</p><p></p><p> );[/CODE]</p><p></p><p>As you can see this function's parameters are incomplete. </p><p>I have read the documentation but I still cannot get what the heck put inside inTrimFramesAtStart and inTrimFramesAtEnd and &myOutTimeline</p><p></p><p></p><p>Can any one explain me kindly? I would be very pleased.</p><p>Thanks in advance.</p></blockquote><p></p>
[QUOTE="nacho4d, post: 738590, member: 62897"] Hi. (I have to say that I am quite new to Core Audio.) I am trying to use AudioQueueEnqueueBufferWithParameters function so I can enqueue buffers corresponding a certain time, like song navigation. (suppose a have a GUI time line, (for example UISlider) and I want to be able to go to any audio's position in time, so I can enqueue the corresponding buffers to that time and enqueue them to be played -> As far as I understand this can be accomplished by using AudioQueueEnqueueBufferWithParameters) For example in iPhone speakHere project > AudioPlayer.m > playbackCall function there is [CODE]AudioQueueEnqueueBuffer ( inAudioQueue, bufferReference, ([ player packetDescriptions ] ? numPackets : 0), [ player packetDescriptions ] );[/CODE] but I want to have more control so I would use [CODE]UInt32 inTrimFramesAtStart, inTrimFramesAtEnd; AudioQueueTimelineRef myOutTimeline; AudioQueueCreateTimeline(inAudioQueue, &myOutTimeline); //is this correct? AudioQueueEnqueueBufferWithParameters( inAudioQueue, bufferReference, ([player packetDescriptions] ? numPackets : 0), [player packetDescriptions], inTrimFramesAtStart, //??????? inTrimFramesAtEnd, //??????? 0, //since I am not passing any parameter NULL, //since I am not setting any parameter NULL, //ASAP &myOuTimeline, //something tells me that is not good );[/CODE] As you can see this function's parameters are incomplete. I have read the documentation but I still cannot get what the heck put inside inTrimFramesAtStart and inTrimFramesAtEnd and &myOutTimeline Can any one explain me kindly? I would be very pleased. Thanks in advance. [/QUOTE]
Verification
Name this item 🌈
Post reply
Forums
macOS & iOS Developer Playground
macOS - Development and Darwin
Core Audio AudioQueueEnqueueBufferWithParameters
Top