Re: Allowing a user-space driver to be the default system
Re: Allowing a user-space driver to be the default system
- Subject: Re: Allowing a user-space driver to be the default system
- From: Stéphane Letz <email@hidden>
- Date: Fri, 25 Mar 2005 09:51:47 +0100
------------------------------
Message: 12
Date: Thu, 24 Mar 2005 11:55:06 -0800
From: Jeff Moore <email@hidden>
Subject: Re: Allowing a user-space driver to be the default system
driver
To: CoreAudio API <email@hidden>
Message-ID: <email@hidden>
Content-Type: text/plain; charset=ISO-8859-1; delsp=yes; format=flowed
You need to implement the following properties in each device:
kAudioDevicePropertyDeviceCanBeDefaultDevice = 'dflt',
// a UInt32 where 0 means that the device cannot be
selected as the default
// device and 1 menas that it can. The isInput argument
selects which kind
// of default device is being queried.
kAudioDevicePropertyDeviceCanBeDefaultSystemDevice = 'sflt',
// a UInt32 where 0 means that the device cannot be
selected as the default
// system device and 1 menas that it can. The isInput
argument selects which
// kind of default system device is being queried. Note
that this property can
// only be queried for output.
In addition, the HAL shell adds other restrictions including (but not
limited to) disallowing non-mixable devices as well as non-linear PCM
devices.
On Mar 24, 2005, at 7:40 AM, Stéphane Letz wrote:
We are developing a user-space driver (that implement the
AudioHardwarePlugIn.h API). What is the right way to allow this
kind of driver to be the default system output or input driver?
(When selecting our driver in AudioMidi setup as the default system
output or input, this "state" is not saved, thus when opening again
the AudioMidi setup, our driver does not appear as default system
output or input anymore.)
Thanks.
Our driver was already implementing the
kAudioDevicePropertyDeviceCanBeDefaultDevice and
kAudioDevicePropertyDeviceCanBeDefaultSystemDevice.
I'm also implementing the kAudioDevicePropertySupportsMixing property
for the Device (in DeviceGetProperty)
and our driver stream format is : kAudioFormatFlagIsPacked
| kLinearPCMFormatFlagIsFloat
| kAudioFormatFlagIsBigEndian
| kAudioFormatFlagIsNonInterleaved
But it is not working... Thus i tried to implement also the
kAudioDevicePropertySupportsMixing property for the Stream (in
DeviceGetStreamProperty) but it is still not working....
So I guess there is still something missing... Any idea?
(this default driver behaviour was correctly working under Jaguar and
stopped working under Panther....)
Another question:
Our driver does not support changing some properties (with
DeviceSetProperty): for example it runs at only one possible sample
rate and one buffer size at a time. Thus it accepts DeviceSetProperty
for the exact buffersize and samplerate
internally supported, otherwise it returns an error. The question: what
is the correct error value that has to be returned?
I usually use kAudioHardwareUnknownPropertyError for property that
cannot be handled in set mode by our driver. Is this correct? or
should it be kAudioHardwareIllegalOperationError or
kAudioDeviceUnsupportedFormatError sometimes?
Thanks
Stephane Letz
_______________________________________________
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