Re: USB Audio issue
Re: USB Audio issue
- Subject: Re: USB Audio issue
- From: Jeff Moore <email@hidden>
- Date: Wed, 4 Jun 2003 11:34:38 -0700
So you are doing two things that are bad.
First, the HAL's API is asynchronous. When you do something like change
the format, you have to wait until you receive the appropriate
notifications to say that the operation succeeded. You point this out
yourself, even.
Second, you are caching AudioStreamIDs across notifications for
kAudioDevicePropertyStreams. When you get this notification, you have
to re-fetch the streams of the device.
On Wednesday, June 4, 2003, at 01:03 AM, Martin Hairer wrote:
Hi,
I ran into a very strange problem with the USB Audio driver (using an
iMic). I use
AudioStreamSetProperty() with the kAudioStreamPropertyPhysicalFormat
selector
to change the format into one of the supported formats previously
retrieved with
kAudioStreamPropertyPhysicalFormats. It returns an error code of 0,
but a subsequent
call to AudioStreamGetProperty() with the
kAudioStreamPropertyPhysicalFormat selector
gives me a kAudioHardwareBadStreamError. Also, when I then use the
kAudioDevicePropertyStreams
selector on the device it tells me that there is no stream!! Anyone
has an idea of what's going
on? This is on MacOS 10.2.6. On 10.1.5, it also happens sometimes, but
much less regularly.
Another funny thing is that if I do something else and then go back,
to the iMic, it works
and the stream format is equal to the one that was set previously! I
just don't understand...
Is this a known bug? Is there a workaround? The same code works as
expected with
the internal mic. Regards,
Martin
HairerSoft
http://www.hairersoft.com/
_______________________________________________
coreaudio-api mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/coreaudio-api
Do not post admin requests to the list. They will be ignored.
--
Jeff Moore
Core Audio
Apple
_______________________________________________
coreaudio-api mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/coreaudio-api
Do not post admin requests to the list. They will be ignored.