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
but I want to have more control so I would use
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.
(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.