QueuePlay.zip
main.m
QueuePlayAppDelegate
View
Take the file
musette.mp3
from the
switch project
and add it to this project.
Put it in the project’s folder,
Project → Add to Project… Add Add
Add the
AudioToolbox
framework to the project.
Project → Edit Active Target “QueuePlay” → General → Linked LibrariesPress
+
to add
AudioToolbox.framework
.
Add
AudioTimeStamp stamp; status = AudioQueueEnqueueBufferWithParameters( p->queue, buffer, p->description == NULL ? 0 : numPackets, p->description, 0, 0, 0, NULL, NULL, &stamp ); if (stamp.mFlags & kAudioTimeStampSampleTimeValid) { NSLog(@"stamp.mSampleTime / 21888 == %f", stamp.mSampleTime / 21888); } if (stamp.mFlags & kAudioTimeStampHostTimeValid) { NSLog(@"stamp.mHostTime == %qu", stamp.mHostTime); }