• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Contradiction in the core audio queue services API
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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 10:48:55 +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
inFormat

The data format of the audio to play. For linear PCM, only interleaved formats are supported. Compressed formats are also supported.

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

You specify a callback function when creating a new playback audio queue with the AudioQueueNewOutput function. The callback is invoked each time its playback audio queue has acquired the data from an audio queue buffer, at which point the buffer is available for reuse. Typically, your callback then fills the newly-available buffer with data from a file or other buffer, and then reenqueues the buffer for playback.

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

  • Prev by Date: Re: "Friendly" setting sample rates
  • Next by Date: RE: Input Render Callback and Channels
  • Previous by thread: Re: How to get/set microphone volume
  • Next by thread: Contradiction in the core audio queue services API
  • Index(es):
    • Date
    • Thread