Browse Source

Hard-code RtAudio driver names.

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

+ 13
- 1
src/rtaudio.cpp View File

@@ -204,7 +204,19 @@ struct RtAudioDriver : audio::Driver {
}

std::string getName() override {
return RtAudio::getApiDisplayName(rtAudio->getCurrentApi());
static const std::map<RtAudio::Api, std::string> 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<int> getDeviceIds() override {


Loading…
Cancel
Save