mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-16 03:36:32 +01:00
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:
parent
1d6e8f6681
commit
71e7b2fbd6
2 changed files with 11 additions and 0 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue