From 7ad436bbf96f9f2431802a6e86fc027d8e30fcb3 Mon Sep 17 00:00:00 2001 From: Andrew Belt Date: Sun, 5 Jan 2020 04:31:07 -0500 Subject: [PATCH] Hard-code RtAudio driver names. --- src/rtaudio.cpp | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/rtaudio.cpp b/src/rtaudio.cpp index 8a10e094..72707e60 100644 --- a/src/rtaudio.cpp +++ b/src/rtaudio.cpp @@ -204,7 +204,19 @@ struct RtAudioDriver : audio::Driver { } std::string getName() override { - return RtAudio::getApiDisplayName(rtAudio->getCurrentApi()); + static const std::map apiNames = { + {RtAudio::LINUX_ALSA, "ALSA"}, + {RtAudio::UNIX_JACK, "JACK (unsupported)"}, + {RtAudio::LINUX_PULSE, "PulseAudio"}, + {RtAudio::LINUX_OSS, "OSS"}, + {RtAudio::WINDOWS_WASAPI, "WASAPI"}, + {RtAudio::WINDOWS_ASIO, "ASIO"}, + {RtAudio::WINDOWS_DS, "DirectSound"}, + {RtAudio::MACOSX_CORE, "CoreAudio"}, + {RtAudio::RTAUDIO_DUMMY, "Dummy"}, + {RtAudio::UNSPECIFIED, "Unspecified"}, + }; + return apiNames.at(rtAudio->getCurrentApi()); } std::vector getDeviceIds() override {