Browse Source

Add mutex to AudioInterface::getDeviceName

tags/v0.5.0
Andrew Belt 7 years ago
parent
commit
f33220aa9b
1 changed files with 1 additions and 0 deletions
  1. +1
    -0
      src/core/AudioInterface.cpp

+ 1
- 0
src/core/AudioInterface.cpp View File

@@ -208,6 +208,7 @@ std::string AudioInterface::getDeviceName(int deviceId) {
if (deviceId < 0)
return "";

std::lock_guard<std::mutex> lock(bufferMutex);
try {
RtAudio::DeviceInfo deviceInfo = stream.getDeviceInfo(deviceId);
return stringf("%s (%d in, %d out)", deviceInfo.name.c_str(), deviceInfo.inputChannels, deviceInfo.outputChannels);


Loading…
Cancel
Save