Commit 350215e2 authored by sletz's avatar sletz
Browse files

Dynamic system version detection in JackCoreAudioDriver to either create...

Dynamic system version detection in JackCoreAudioDriver to either create public or private aggregate device.

git-svn-id: http://subversion.jackaudio.org/jack/jack2/trunk/jackmp@3678 0c269be4-1314-0410-8aa9-9f06e86f4224
parent d85cb284
......@@ -25,10 +25,14 @@ Paul Davis
Jackdmp changes log
---------------------------
2009-10-27 Stephane Letz <letz@grame.fr>
* Dynamic system version detection in JackCoreAudioDriver to either create public or private aggregate device.
2009-10-26 Stephane Letz <letz@grame.fr>
* Implement "hog mode" (exclusive access of the audio device) in JackCoreAudioDriver.
* Fix jack_set_sample_rate_callback to have he same bevahior as in JACK1.
* Fix jack_set_sample_rate_callback to have he same behavior as in JACK1.
2009-10-25 Stephane Letz <letz@grame.fr>
......
......@@ -1004,7 +1004,19 @@ OSStatus JackCoreAudioAdapter::CreateAggregateDevice(AudioDeviceID captureDevice
// add a "private aggregate key" to the dictionary
int value = 1;
CFNumberRef AggregateDeviceNumberRef = CFNumberCreate(NULL, kCFNumberIntType, &value);
CFDictionaryAddValue(aggDeviceDict, CFSTR(kAudioAggregateDeviceIsPrivateKey), AggregateDeviceNumberRef);
SInt32 system;
Gestalt(gestaltSystemVersion, &system);
jack_log("JackCoreAudioDriver::CreateAggregateDevice : system version = %x limit = %x", system, 0x00001054);
// Starting with 10.5.4 systems, the AD can be internal... (better)
if (system < 0x00001054) {
jack_log("JackCoreAudioDriver::CreateAggregateDevice : public aggregate device....");
} else {
jack_log("JackCoreAudioDriver::CreateAggregateDevice : private aggregate device....");
CFDictionaryAddValue(aggDeviceDict, CFSTR(kAudioAggregateDeviceIsPrivateKey), AggregateDeviceNumberRef);
}
//-------------------------------------------------
// Create a CFMutableArray for our sub-device list
......
......@@ -484,19 +484,19 @@ OSStatus JackCoreAudioDriver::CreateAggregateDevice(AudioDeviceID captureDeviceI
CFDictionaryAddValue(aggDeviceDict, CFSTR(kAudioAggregateDeviceUIDKey), AggregateDeviceUIDRef);
// add a "private aggregate key" to the dictionary
int value = 1;
CFNumberRef AggregateDeviceNumberRef = CFNumberCreate(NULL, kCFNumberIntType, &value);
SInt32 major;
SInt32 minor;
SInt32 bugfix;
Gestalt(gestaltSystemVersionMajor, &major);
Gestalt(gestaltSystemVersionMinor, &minor);
Gestalt(gestaltSystemVersionBugFix, &bugfix);
SInt32 system;
Gestalt(gestaltSystemVersion, &system);
jack_log("JackCoreAudioDriver::CreateAggregateDevice : system version = %x limit = %x", system, 0x00001054);
// Starting with 10.5.4 systems, the AD can be internal... (better)
if (major == 10 && minor >= 5 && bugfix >= 4) {
if (system < 0x00001054) {
jack_log("JackCoreAudioDriver::CreateAggregateDevice : public aggregate device....");
} else {
jack_log("JackCoreAudioDriver::CreateAggregateDevice : private aggregate device....");
CFDictionaryAddValue(aggDeviceDict, CFSTR(kAudioAggregateDeviceIsPrivateKey), AggregateDeviceNumberRef);
}
......@@ -587,6 +587,7 @@ OSStatus JackCoreAudioDriver::CreateAggregateDevice(AudioDeviceID captureDeviceI
// Clean up
//----------
// release the private AD key
CFRelease(AggregateDeviceNumberRef);
// release the CF objects we have created - we don't need them any more
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment