Core Audio AudioQueueEnqueueBufferWithParameters

Joined
Jul 31, 2008
Messages
2
Reaction score
0
Points
1
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 ]
		);

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

		);

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.
 
Joined
Oct 30, 2008
Messages
1
Reaction score
0
Points
1
audio timeline

Hi,

I'm working on a similar problem. Did you find a solution? If so, any links, references, etc. wd be appreciated.

Thanks!
 

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top