Set the default host api in PortaudioBackend when initializing portaudio
Not setting a default driver causes issues with the EngineControl dialog
This commit is contained in:
@@ -321,6 +321,8 @@ PortAudioIO::initialize_pa ()
|
||||
return false;
|
||||
}
|
||||
_initialized = true;
|
||||
_host_api_index = Pa_GetDefaultHostApi ();
|
||||
_host_api_name = get_host_api_name_from_index (_host_api_index);
|
||||
}
|
||||
|
||||
return true;
|
||||
@@ -343,6 +345,14 @@ PortAudioIO::host_api_list (std::vector<std::string>& api_list)
|
||||
}
|
||||
}
|
||||
|
||||
std::string
|
||||
PortAudioIO::get_host_api_name_from_index (PaHostApiIndex index)
|
||||
{
|
||||
std::vector<std::string> api_list;
|
||||
host_api_list(api_list);
|
||||
return api_list[index];
|
||||
}
|
||||
|
||||
bool
|
||||
PortAudioIO::set_host_api (const std::string& host_api_name)
|
||||
{
|
||||
|
||||
@@ -98,6 +98,7 @@ private: // Methods
|
||||
void clear_device_lists ();
|
||||
void add_default_devices ();
|
||||
void add_devices ();
|
||||
std::string get_host_api_name_from_index (PaHostApiIndex index);
|
||||
|
||||
private: // Data
|
||||
int _state;
|
||||
|
||||
Reference in New Issue
Block a user