bool ARDevice::initHardware(IOService* inProvider) { bool theAnswer = false; if(IOAudioDevice::initHardware(inProvider)) { // set up some basic stuff about the device setDeviceName("DeviceName"); setDeviceShortName("DeviceShortName"); setManufacturerName("ManufacturerName"); setDeviceModelName("Audio_Reflector"); setDeviceTransportType('virt'); setDeviceCanBeDefault(0); // Setting this flag causes the HAL to use the strings passed to it as keys into the Localizable.strings file. #if AR_Debug // for debugging, use the location in the build results setProperty (kIOAudioDeviceLocalizedBundleKey, "../../../Path/To/Your/BuildProducts/AudioReflectorDriver.kext"); #else setProperty (kIOAudioDeviceLocalizedBundleKey, "AudioReflectorDriver.kext"); #endif theAnswer = CreateAudioEngine(); } return theAnswer; }
/* * initHardware() */ bool SoundflowerDevice::initHardware(IOService *provider) { bool result = false; //IOLog("SoundflowerDevice[%p]::initHardware(%p)\n", this, provider); if (!super::initHardware(provider)) { goto Done; } setDeviceName("Soundflower"); setDeviceShortName("Soundflower"); setManufacturerName("ma++ ingalls for Cycling '74"); if (!createAudioEngines()) { goto Done; } result = true; Done: return result; }
bool PNetAudioDevice::initHardware (IOService *provider) { if (!super::initHardware(provider)) { IOLog("IOAudioDevice::initHardware(%p) failed\n", provider); return false; } setDeviceName("Portable Network Audio Device"); setDeviceShortName("PNetAudio"); setManufacturerName("LowH.net"); return createAudioEngine(); }
bool SoundflowerDevice::initHardware(IOService *provider) { bool result = false; if (!super::initHardware(provider)) goto Done; setDeviceName("WavTap"); setDeviceShortName("WavTap"); setManufacturerName("WavTap"); if (!createAudioEngines()) goto Done; result = true; Done: return result; }
bool MixlrAudioDevice::initHardware(IOService *provider) { bool result = false; //IOLog("MixlrAudioDevice[%p]::initHardware(%p)\n", this, provider); if (!super::initHardware(provider)) goto Done; setDeviceName("Mixlr"); setDeviceShortName("Mixlr"); setManufacturerName("Mixlr"); if (!createAudioEngines()) goto Done; result = true; Done: return result; }
bool AppleIntelAC97AudioDriver::initHardware( IOService * provider ) { DebugLog("%s::%s(%p)\n", getName(), __FUNCTION__, provider); if ( super::initHardware(provider) == false ) { IOLog("super::initHardware\n"); goto fail; } setManufacturerName( "Intel" ); setDeviceName( "AC97 Audio Controller" ); // Keep a reference to our provider. Must be an audio codec. _audioCodec = OSDynamicCast( AppleIntelAC97Codec, provider ); if ( _audioCodec == 0 ) { goto fail; } // Open codec for exclusive access. if ( _audioCodec->open( this ) == false ) { DebugLog("%s: codec open error\n", getName()); goto fail; } // Create audio engine. if ( createAudioEngine() == false ) { DebugLog("%s: createAudioEngine() error\n", getName()); goto fail; } // Create audio ports, and attach them to audio engine. if ( createAudioPorts() == false ) { DebugLog("%s: createAudioPorts() error\n", getName()); goto fail; } // Activate audio engine. if ( activateAudioEngine( _audioEngine ) != kIOReturnSuccess ) { DebugLog("%s: activateAudioEngine() error\n", getName()); goto fail; } // Flush default audio control settings. flushAudioControls(); return true; fail: if ( _audioCodec ) { _audioCodec->close( this ); _audioCodec = 0; } return false; }