Re: asynchronous change of kAudioStreamPropertyPhysicalFormat
Re: asynchronous change of kAudioStreamPropertyPhysicalFormat
- Subject: Re: asynchronous change of kAudioStreamPropertyPhysicalFormat
- From: Jeff Moore <email@hidden>
- Date: Wed, 21 Dec 2005 12:38:21 -0800
On Dec 21, 2005, at 11:35 AM, Derk-Jan Hartman wrote:
For VLC I change the kAudioStreamPropertyPhysicalFormat so i can do
cac3 output:
I retrieve the original format, so that I can back it up
Set the new format, enter a conditional lock.
The Streamlistener listens for the
kAudioStreamPropertyPhysicalFormat, and unlocks the condition.
Then the main method continues, and will query the "fresh/new"
kAudioStreamPropertyPhysicalFormat.
Usually it works, however sometimes the following occurs...
[00000319] auhal audio output debug: original stream format: [44100]
[lpcm][30][4][1][4][2][16]
[00000319] auhal audio output debug: setting stream format: [48000]
[cac3][94][6144][1536][0][2][16]
[00000319] auhal audio output debug: actual format in use: [44100]
[lpcm][94][4][1][4][2][16]
So naturally this has me confused... I receive the "callback" that
the property changed, but apparently it's not changed yet sometimes
(a timeout did not occur, i checked). However, later on, when the
playback actually commenced (the IOProc is running), the format HAS
changed. What is going on here. anyone have an idea?
If you look closely, the format _did_ change. At least the flags
field did. Specifically, kAudioFormatFlagIsNonMixable got set.
It would appear that the hardware accepted the non-mixable part of
what you set, but rejected the AC-3 part. It's tough to say why, but
you might want to compare the AC-3 ASBD you send to the device with
the AC-3 ASBD it is advertising that it supports. On the surface, it
doesn't seem like yours is incorrect but it may not match up entirely
with what the device is expecting.
--
Jeff Moore
Core Audio
Apple
_______________________________________________
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