• 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
trouble with AudioQueuOfflineRender() after a while my queue callback function no longer gets invoked even thou queue is still running!
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

trouble with AudioQueuOfflineRender() after a while my queue callback function no longer gets invoked even thou queue is still running!


  • Subject: trouble with AudioQueuOfflineRender() after a while my queue callback function no longer gets invoked even thou queue is still running!
  • From: "Andrew E. Davidson" <email@hidden>
  • Date: Wed, 25 Mar 2009 11:08:32 -0700

Hi

 

I use AudioQueueOffline render to convert mp3 into PCM, I then do some processing and use a second AudioQueue to play back.

 

I am running into a strange problem trying to loop audio. Everything works fine as long as I do not try to loop. Basically I set up the queue with several input buffers. I calculate the total number of audio frames and keep a running total of the number of frames returned by AudioQueueOfflineRender. I never request more than the total number of frames.

 

When looping is on, my queue callback function hits the EOF condition long before the total numbers of frames returned by AQOfflineRender equals the total audio frames. This is expected I use several input buffers. The audio output continues to play. I can see my queue callback function is called several times reading from the beginning of the audio file and is enqueueing correctly.

 

Eventually, the system stops calling my queue callback function. I put some test code in that call AudioQueueGetProperty( kAudioQueueProperty_IsRunning ) it shows that my queue is still running!!!  My playback code keeps looping calling AudioQueueOfflineRender(), how ever all I get is silence.

 

Listening to the play back it sound like the song plays exactly once.

 

You can find a code listing at  https://devforums.apple.com/thread/11240?tstart=0

 

I used afinfo utility program  to double check that my application is correctly calculating the total number of packets and the total number of audio frames. I even put some test code in that makes sure I do not request the 1000 frames from AudioQueueOfflineRender, but this does not seem to help

 

You can find a code listing on https://devforums.apple.com/thread/11240?tstart=0

 

Any idea how I debug this ? Is there any way to look into the queue state?

 

 

Thanks

 

Andy

 

p.s. I am doing all my testing using OS 2.2.1 and the simulator

 _______________________________________________
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: trouble with AudioQueuOfflineRender() after a while my queue callback function no longer gets invoked even thou queue is still running!
      • From: Hamish Allan <email@hidden>
  • Prev by Date: Re: How to show the wave of the audio file in my application when sound is playing?
  • Next by Date: Re: trouble with AudioQueuOfflineRender() after a while my queue callback function no longer gets invoked even thou queue is still running!
  • Previous by thread: RE: AudioQueueOflineRender() and 'alac' files on iPhone
  • Next by thread: Re: trouble with AudioQueuOfflineRender() after a while my queue callback function no longer gets invoked even thou queue is still running!
  • Index(es):
    • Date
    • Thread