mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-15 00:24:19 +00:00
Fixed a typo in CoreAudio device opening.
This commit is contained in:
parent
158d5693ce
commit
205e5ca74f
1 changed files with 4 additions and 7 deletions
|
|
@ -1827,14 +1827,10 @@ public:
|
|||
const int inputIndex = inputDeviceNames.indexOf (inputDeviceName);
|
||||
const int outputIndex = outputDeviceNames.indexOf (outputDeviceName);
|
||||
|
||||
String deviceName (outputDeviceName);
|
||||
if (deviceName.isEmpty())
|
||||
deviceName = inputDeviceName;
|
||||
|
||||
AudioDeviceID inputDeviceID = inputIds [inputIndex];
|
||||
AudioDeviceID inputDeviceID = inputIds [inputIndex];
|
||||
AudioDeviceID outputDeviceID = outputIds [outputIndex];
|
||||
|
||||
if (inputDeviceID == 0 && inputDeviceID == 0)
|
||||
if (inputDeviceID == 0 && outputDeviceID == 0)
|
||||
return nullptr;
|
||||
|
||||
if (inputDeviceID == outputDeviceID)
|
||||
|
|
@ -1851,7 +1847,8 @@ public:
|
|||
if (in == nullptr) return out.release();
|
||||
if (out == nullptr) return in.release();
|
||||
|
||||
ScopedPointer<AudioIODeviceCombiner> combo (new AudioIODeviceCombiner (deviceName));
|
||||
ScopedPointer<AudioIODeviceCombiner> combo (new AudioIODeviceCombiner (outputDeviceName.isEmpty() ? inputDeviceName
|
||||
: outputDeviceName));
|
||||
combo->addDevice (in.release());
|
||||
combo->addDevice (out.release());
|
||||
return combo.release();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue