Contradiction in the core audio queue services API
Contradiction in the core audio queue services API
- Subject: Contradiction in the core audio queue services API
- From: Stephen Thomas <email@hidden>
- Date: Tue, 20 Oct 2009 22:46:04 +0530
Hi,
In the following document,
http://developer.apple.com/mac/library/documentation/MusicAudio/Reference/AudioQueueReference/Reference/reference.html
There is a contradiction(Contradiction is highlighted in red
color). In the parameter list of AudioQueueNewOutput, it is mentioned
that, callback will get called after the buffer is played.
But in the description of AudioQueueOutputCallback, it is contradicted.
Which is true in this case?
AudioQueueNewOutput
Creates a new playback audio queue object.
OSStatus AudioQueueNewOutput (
const AudioStreamBasicDescription *inFormat,
AudioQueueOutputCallback inCallbackProc,
void *inUserData,
CFRunLoopRef inCallbackRunLoop,
CFStringRef inCallbackRunLoopMode,
UInt32 inFlags,
AudioQueueRef *outAQ
);
Parameters
- inCallbackProc
A
callback function to use with the playback audio queue. The audio queue
calls this function when the audio queue has finished playing a buffer.
See AudioQueueOutputCallback
.
-------------------------------------------------------------------
AudioQueueOutputCallback
Defines a pointer to a callback function that is called when an audio queue buffer is available for reuse.
typedef void (*AudioQueueOutputCallback) (
void *inUserData,
AudioQueueRef inAQ,
AudioQueueBufferRef inBuffer
);
Discussion
When your application receives a call to the AudioQueueOutputCallback
function, you cannot assume that the audio data from the
newly-available buffer has been played. To ensure that all queued audio
has finished playing, use the AudioQueuePropertyListenerProc
property listener callback function, set to listen to the kAudioQueueProperty_IsRunning
property.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden