• 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
AudioQueue Usage Question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: AudioQueue Usage Question
      • From: Jens Alfke <email@hidden>
  • Prev by Date: Re: Recording compressed audio file
  • Next by Date: Re: AudioFileWritePackets divide by zero
  • Previous by thread: Re: AudioFileWritePackets divide by zero
  • Next by thread: Re: AudioQueue Usage Question
  • Index(es):
    • Date
    • Thread