Audio Queue Services Programming Guide
PDF
Introduction
About Audio Queues
What Is an Audio Queue?
Audio Queue Architecture
Audio Queues for Recording
Audio Queues for Playback
Audio Queue Buffers
The Buffer Queue and Enqueuing
The Recording Process
The Playback Process
Controlling the Playback Process
The Audio Queue Callback Function
The Recording Audio Queue Callback Function
The Playback Audio Queue Callback Function
Using Codecs and Audio Data Formats
Audio Queue Control and State
Audio Queue Parameters
Recording Audio
Define a Custom Structure to Manage State
Write a Recording Audio Queue Callback
The Recording Audio Queue Callback Declaration
Writing an Audio Queue Buffer to Disk
Enqueuing an Audio Queue Buffer
A Full Recording Audio Queue Callback
Write a Function to Derive Recording Audio Queue Buffer Size
Set a Magic Cookie for an Audio File
Set Up an Audio Format for Recording
Create a Recording Audio Queue
Creating a Recording Audio Queue
Getting the Full Audio Format from an Audio Queue
Create an Audio File
Set an Audio Queue Buffer Size
Prepare a Set of Audio Queue Buffers
Record Audio
Clean Up After Recording
Playing Audio
Define a Custom Structure to Manage State
Write a Playback Audio Queue Callback
The Playback Audio Queue Callback Declaration
Reading From a File into an Audio Queue Buffer
Enqueuing an Audio Queue Buffer
Stopping an Audio Queue
A Full Playback Audio Queue Callback
Write a Function to Derive Playback Audio Queue Buffer Size
Open an Audio File for Playback
Obtaining a CFURL Object for an Audio File
Opening an Audio File
Obtaining a File’s Audio Data Format
Create a Playback Audio Queue
Set Sizes for a Playback Audio Queue
Setting Buffer Size and Number of Packets to Read
Allocating Memory for a Packet Descriptions Array
Set a Magic Cookie for a Playback Audio Queue
Allocate and Prime Audio Queue Buffers
Set an Audio Queue’s Playback Gain
Start and Run an Audio Queue
Clean Up After Playing
Revision History