AudioQueue Usage Question
AudioQueue Usage Question
- Subject: AudioQueue Usage Question
- From: David Collins <email@hidden>
- Date: Mon, 02 Mar 2009 16:17:07 -0600
I am trying to use an AudioQueue to play lpcm audio from packets that have been streamed over the network.
The AudioStreamBasicDescription for the audio is:
mSampleRate = 8000.0 mFormatID = kAudioFormatFlagIsSignedInteger mBytesPerPacket = 4 mFramesPerPacket=1 mBytesPerFrame=4 mChannelsPerFrame=2 mBitsPerChannel=16
To better test the AudioQueue I am reading the packets from a movie, using the AudioConverter to convert to the desired format and then generating a packet containing 960 frames which has a duration of 120 milliseconds. (I have independently confirmed that the packets obtained from the move are valid).
My problem is that when i start the queue, the AudioQueue plays everything really fast. I just hear sputters and the playing terminates quickly. (The playing ends wen the last buffer is queued). It plays so quickly that I have to insert silence when i cannot keep up. Would anyone have an idea of why it plays so quickly? I tried the AudioQueueEnqueueBufferWithParameters and specified a start time for each buffer but it did not make any difference.
Thanks,
David
|
_______________________________________________
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