• 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
RE: 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]

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


  • Subject: RE: 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: Thu, 26 Mar 2009 14:19:56 -0700

Hi Hamish

> -----Original Message-----
> From: Hamish Allan [mailto:email@hidden]
>
> data you've enqueued has been rendered. What is the errorStatus
> returned by the call to AudioQueueEnqueueBufferWithParameters()?

I never get an error from AudioQueueEnqueueBufferWithParameters()

I have two control variables startingPacketNumber and numFramesRendered.

startingPacketNumber is used to control looping in the queue callback
function. It is passed to AudioFileReadPacketData in the inStartingPacket
argument. When AudioFileReadPacketData() returns 0 packets, I reset
startingPacketNumber = 0. My understanding is this should cause the next
read to be from the beginning of the file. Is my understanding correct? As
far as I know there is no other way to "fseek()" to the beginning of the
file.

I use numFramesRendered to control how many frames I request from
AudioQueuOfflineRender(). Before each call to AudioQueueOfflineRender I have
the following code

inRequestFrames = 2048; // buffer is large enough to hold 4096 frames.
If ( numFramesRendered + inRequestFrames >= totalFrames ) {
	inRequestFramems = totalFrames - numFramesRendered;
}

The reason I have this code is that at the end of the file, there is a good
chance I have enqueued less than a full buffers worth of data. This code
insures I only ask for the number of frames in the short buffer.

I used the auinfo command line utility to make sure I am calculating the
total number of packets and frames correctly.

I can not figure out why I observe the following
1) the song plays through correctly exactly once.
2) from this point I get silence
2.1) I know that before the call to AudioQueueOfflineRender  to get the
frames for the end of the, I have enqueued frames from the beginning of the
song.
2.5 ) audioQueueOfflineRender never returns an error
3) My queue callback function is no longer being invoked
4) AudioQueueGetProperty shows my queue is still running!


Any idea how I can debug this?

Andy


 _______________________________________________
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>
References: 
 >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>)
 >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>)
 >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: ID3 tag for AIFF files
  • Next by Date: Re: ID3 tag for AIFF files
  • Previous by thread: Re: trouble with AudioQueuOfflineRender() after a while my queue callback function no longer gets invoked even thou queue is still running!
  • 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