10-11-2008, 03:23 AM #1
Core Audio AudioQueueEnqueueBufferWithParameters
- Member Since
- Jul 31, 2008
(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
AudioQueueEnqueueBuffer ( inAudioQueue, bufferReference, ([ player packetDescriptions ] ? numPackets : 0), [ player packetDescriptions ] );
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 );
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.
10-30-2008, 12:28 PM #2
- Member Since
- Oct 30, 2008
I'm working on a similar problem. Did you find a solution? If so, any links, references, etc. wd be appreciated.
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
By JoshJ in forum OS X - Operating SystemReplies: 0Last Post: 11-29-2014, 07:42 AM
By forest_wizard in forum OS X - Operating SystemReplies: 12Last Post: 05-23-2014, 01:49 AM
By sus4 in forum OS X - Operating SystemReplies: 3Last Post: 12-12-2013, 09:15 PM
By tripleb in forum Music, Audio, and PodcastingReplies: 0Last Post: 05-17-2009, 02:45 PM
By stay where i ca in forum OS X - Operating SystemReplies: 1Last Post: 11-07-2007, 04:43 PM