Browse Source

Prevent multiple ASIO devices from being used simultaneously

tags/v2.0.0
Andrew Belt 3 years ago
parent
commit
c6a23ddbf1
1 changed files with 4 additions and 0 deletions
  1. +4
    -0
      src/rtaudio.cpp

+ 4
- 0
src/rtaudio.cpp View File

@@ -334,6 +334,10 @@ struct RtAudioDriver : audio::Driver {
RtAudioDevice* device;
auto it = devices.find(deviceId);
if (it == devices.end()) {
// ASIO only allows one device to be used simultaneously
if (api == RtAudio::WINDOWS_ASIO && devices.size() >= 1)
throw Exception("ASIO driver only allows one audio device to be used simultaneously");

// Can throw Exception
device = new RtAudioDevice(api, deviceId);
devices[deviceId] = device;


Loading…
Cancel
Save