Re: Getting Default Output Device gives a strange answer
Re: Getting Default Output Device gives a strange answer
- Subject: Re: Getting Default Output Device gives a strange answer
- From: Jeff Moore <email@hidden>
- Date: Tue, 14 Nov 2006 11:11:18 -0800
A value of 0 for an AudioDeviceID is defined in AudioHardware.h to be
kAudioDeviceUnknown. In this context, it is to be taken to mean that
there is currently no device capable and/or willing to be the default
device currently.
Also, not having a default device when asked is not an API error,
hence no error code will be returned.
On Nov 13, 2006, at 7:29 PM, Andrew Kimpton wrote:
I have :
UInt32 size;
AudioDeviceID outputDevice = -1;
OSStatus osErr =
AudioHardwareGetProperty(kAudioHardwarePropertyDefaultOuputDevice,
&size,
&outputDevice);
And I seem to have got my Intel Mac Mini 'wedged' such that the
above code returns noErr but gives
zero for the outputDevice - even though HALLab tells me that the ID
is 0x104
Is there any other way to get the device ID of the default output
device ? Is there some initialization step
I've missed somewhere ?
Full disclosure - I have been playing with hog mode to grab the
optical output (ie the default output) so
I can send AC-3 data to an attached decoder, and I probably aborted
the app without releasing hog mode.
However HALLab seems pretty happy, and thinks the Hog mode 'id' is
-1 which I take to mean no-one is
hogging things right now.
--
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