RE: AudioQueue Services approximate latency?
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