• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Allowing a user-space driver to be the default
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Allowing a user-space driver to be the default


  • Subject: Re: Allowing a user-space driver to be the default
  • From: Stéphane Letz <email@hidden>
  • Date: Fri, 1 Apr 2005 11:28:07 +0200


Message: 10 Date: Thu, 31 Mar 2005 11:55:07 -0800 From: Jeff Moore <email@hidden> Subject: Re: R?p : Allowing a user-space driver to be the default system To: CoreAudio API <email@hidden> Message-ID: <email@hidden> Content-Type: text/plain; charset=ISO-8859-1; delsp=yes; format=flowed

First I realized after sending previous mails that the kAudioHardwarePropertyDeviceForUID property does not have to be implemented by devices.... so I removed it. Only kAudioDevicePropertyDeviceUID is implemented.



Well, it's either still failing some test or your device is failing

The strange thing is that my device can be selected as default driver later on (I mean when applications are running)



to make itself available in the device list when the HAL is updating
the default device state initially.

How does the HAL updates the default device state?
It was working under Jaguar... What has changed under Panther in this area?


Is there anything unusual about
the life cycle of your devices?



My device does in its plug-in Initialize function :

......
AudioHardwareClaimAudioDeviceID
AudioHardwareDevicesCreated
AudioHardwareClaimAudioStreamID for all requires streams
AudioHardwareStreamsCreated
.....


Now if I trace calls done in the device when launching an application like iTunes, I see :


.......
AudioHardwareClaimAudioDeviceID

DeviceGetProperty for kAudioDevicePropertyDeviceUID <=== I guess the HAL is doing this call as a consequence of AudioHardwareClaimAudioDeviceID call done by the device

AudioHardwareDevicesCreated
AudioHardwareClaimAudioStreamID for all requires streams
AudioHardwareStreamsCreated
.......

The code for DeviceGetProperty kAudioDevicePropertyDeviceUID is :

case kAudioDevicePropertyDeviceUID: {
if ((outPropertyData == NULL) && (ioPropertyDataSize != NULL)) {
*ioPropertyDataSize = sizeof(CFStringRef);
} else if (*ioPropertyDataSize < sizeof(CFStringRef)) {
Log("DeviceGetProperty : kAudioHardwareBadPropertySizeError %ld\n", *ioPropertyDataSize);
err = kAudioHardwareBadPropertySizeError;
} else {
CFStringRef* outString = (CFStringRef*) outPropertyData;
*outString = CFStringCreateWithCString(NULL, "my_device_name", CFStringGetSystemEncoding());
*ioPropertyDataSize = sizeof(CFStringRef);
}
break;
}


I can *force* my device to be default device *inside* the plug-in itself, doing in plug-in Initialize function :

AudioHardwareClaimAudioDeviceID
AudioHardwareDevicesCreated
AudioHardwareClaimAudioStreamID for all requires streams
AudioHardwareStreamsCreated
.....
AudioHardwareSetProperty(kAudioHardwarePropertyDefaultInputDevice, sizeof(UInt32), &fDeviceID);


then It works, but this is not a really clean way to do....

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


  • Next by Date: Re: Thread count strangeness using PlayAudioFile sample code
  • Next by thread: Re: Thread count strangeness using PlayAudioFile sample code
  • Index(es):
    • Date
    • Thread