Browse Source

Cleanup JackCoreAudioDriver::GetTotalChannels.

git-svn-id: http://subversion.jackaudio.org/jack/jack2/trunk/jackmp@3785 0c269be4-1314-0410-8aa9-9f06e86f4224
tags/v1.9.4
sletz 16 years ago
parent
commit
ca2532315d
1 changed files with 2 additions and 7 deletions
  1. +2
    -7
      macosx/coreaudio/JackCoreAudioDriver.cpp

+ 2
- 7
macosx/coreaudio/JackCoreAudioDriver.cpp View File

@@ -387,22 +387,17 @@ OSStatus JackCoreAudioDriver::GetTotalChannels(AudioDeviceID device, int& channe
OSStatus err = noErr;
UInt32 outSize;
Boolean outWritable;
AudioBufferList* bufferList = 0;

channelCount = 0;
err = AudioDeviceGetPropertyInfo(device, 0, isInput, kAudioDevicePropertyStreamConfiguration, &outSize, &outWritable);
if (err == noErr) {
bufferList = (AudioBufferList*)malloc(outSize);
AudioBufferList bufferList[outSize];
err = AudioDeviceGetProperty(device, 0, isInput, kAudioDevicePropertyStreamConfiguration, &outSize, bufferList);
if (err == noErr) {
for (unsigned int i = 0; i < bufferList->mNumberBuffers; i++)
channelCount += bufferList->mBuffers[i].mNumberChannels;
}

if (bufferList)
free(bufferList);
}

return err;
}



Loading…
Cancel
Save