From f33220aa9b1d6a4788de345b2da052c1e34ea860 Mon Sep 17 00:00:00 2001 From: Andrew Belt Date: Fri, 17 Nov 2017 06:20:07 -0500 Subject: [PATCH] Add mutex to AudioInterface::getDeviceName --- src/core/AudioInterface.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/core/AudioInterface.cpp b/src/core/AudioInterface.cpp index 81c0e5a7..6fcfd373 100644 --- a/src/core/AudioInterface.cpp +++ b/src/core/AudioInterface.cpp @@ -208,6 +208,7 @@ std::string AudioInterface::getDeviceName(int deviceId) { if (deviceId < 0) return ""; + std::lock_guard lock(bufferMutex); try { RtAudio::DeviceInfo deviceInfo = stream.getDeviceInfo(deviceId); return stringf("%s (%d in, %d out)", deviceInfo.name.c_str(), deviceInfo.inputChannels, deviceInfo.outputChannels);