• 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: AudioQueue Services approximate latency?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: AudioQueue Services approximate latency?


  • Subject: RE: AudioQueue Services approximate latency?
  • From: Stéphane Beauchemin <email@hidden>
  • Date: Mon, 8 Nov 2010 09:39:01 -0500
  • Thread-topic: AudioQueue Services approximate latency?

Hi Eric,

First when I read you message I was thinking that I did a really stupid mistake. However, what I have done is ok but maybe I was not so clear.

When I have done my test, I have commented all the line that fills the outputASBD, including the line:
outputASBD.mFormatFlags = kAudioFormatFlagIsFloat |
kAudioFormatFlagIsPacked | kAudioFormatFlagIsNonInterleaved;

To replace it with:
FillOutASBDForLPCM(outputASBD, 44100, 2, 16, 16, false, false, false);

And in fact it is equivalent to:
	outputASBD.mSampleRate = 44100;
	outputASBD.mFormatID = 'lpcm';
	outputASBD.mFormatFlags = kAudioFormatFlagIsSignedInteger | kAudioFormatFlagIsPacked;
	outputASBD.mBytesPerPacket = 4;
	outputASBD.mFramesPerPacket = 1;
	outputASBD.mBytesPerFrame = 4;
	outputASBD.mChannelsPerFrame = 2;
	outputASBD.mBitsPerChannel = 16;
	outputASBD.mReserved = 0;

For sure, I have checked that I am not asking for kAudioFormatFlagIsSignedInteger to overwrite it later in the code with kAudioFormatFlagIsFloat.

I have tried both and even check in the debugger than both are equivalent. I am still getting a 'perm' error on AudioConvertNewSpecific, but it works when I ask for the software codec.

Thanks Eric, for trying to find what I am doing wrong. I even wish that I am doing something wrong, but it just seems that the use of the hardware decoder through the Audio Converter Service is not possible.

Stephane

-----Original Message-----
From: Eric Wing [mailto:email@hidden]
Sent: November-05-10 10:38 PM
To: Stéphane Beauchemin
Cc: Denis Lebel; email@hidden
Subject: Re: AudioQueue Services approximate latency?

On 11/5/10, Stéphane Beauchemin <email@hidden> wrote:
> Hi Eric,
>
> I already try to ask for 16 bit little endian and it doesn't work. In fact
> you can even find leftover of this if you look in the code, the following
> line is commented:
> FillOutASBDForLPCM(outputASBD, 44100, 2, 16, 16, false, false, false);
>

This is the line that looks suspicious to me:
       outputASBD.mFormatFlags = kAudioFormatFlagIsFloat |
kAudioFormatFlagIsPacked | kAudioFormatFlagIsNonInterleaved;

Note the flag: kAudioFormatFlagIsFloat

That is below your FillOutASBDForLPCM call so it will override
anything you may have done in that function.


-Eric
--
Beginning iPhone Games Development
http://playcontrol.net/iphonegamebook/


 _______________________________________________
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

References: 
 >Re: AudioQueue Services approximate latency? (From: Eric Wing <email@hidden>)

  • Prev by Date: Re: Xcode 3.24 and ppc64 support?
  • Next by Date: CoreAudio playback issue
  • Previous by thread: Re: AudioQueue Services approximate latency?
  • Next by thread: Audio Component Count "Badness"
  • Index(es):
    • Date
    • Thread