Change
AudioQueueEnqueueBuffer
to
AudioQueueEnqueueBufferWithParameters
with an
AudiTimeStamp
argument.
The second argument of the function
AudioQueueStart
is a pointer to an
AudioTimeStamp
which specifies exactly when the playback will begin.
Queue.zip
main.m
QueueAppDelegate
View
.h
and
.m
files for class
View
,
File → New File…
Choose a template for your new file: Objective-C class
Subclass of UIView
Next
File Name: View
also create "View.h"
Finish
Project →
Edit Active Target “Queue” →
General →
Linked Libraries
+
to add
AudioToolbox.framework
.
Add
DeriveBufferSize
and the first argument of the other function
DeriveBufferSize
had to be pointers, not references.play
method of class
view
,
I had to set
aqPlayerData.mIsRunning = true;
for
loop that calls
HandleOutputBuffer
.SpeakHere
:
a project with sample code.
Project → Edit Project Settings → Build → Base SDK → iPhone Device 4.0
Simulator - 4.0 | Debug | SpeakHere