mirror of
https://github.com/Ardour/ardour.git
synced 2026-01-08 22:55:44 +01:00
Add Utility function to get host API type in PortaudioIO class
This commit is contained in:
parent
08d6dd153e
commit
c6c0654b5a
2 changed files with 16 additions and 0 deletions
|
|
@ -348,6 +348,21 @@ PortAudioIO::host_api_list (std::vector<std::string>& api_list)
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
PaHostApiTypeId
|
||||
PortAudioIO::get_current_host_api_type () const
|
||||
{
|
||||
const PaHostApiInfo* info = Pa_GetHostApiInfo (_host_api_index);
|
||||
|
||||
if (info == NULL) {
|
||||
DEBUG_AUDIO(string_compose(
|
||||
"Unable to determine Host API type from index %1\n", _host_api_index));
|
||||
return (PaHostApiTypeId)0;
|
||||
}
|
||||
|
||||
return info->type;
|
||||
}
|
||||
|
||||
std::string
|
||||
PortAudioIO::get_host_api_name_from_index (PaHostApiIndex index)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -47,6 +47,7 @@ public:
|
|||
void host_api_list (std::vector<std::string>&);
|
||||
bool set_host_api (const std::string& host_api_name);
|
||||
std::string get_host_api () const { return _host_api_name; }
|
||||
PaHostApiTypeId get_current_host_api_type () const;
|
||||
PaHostApiIndex get_host_api_index_from_name (const std::string& name);
|
||||
|
||||
PaDeviceIndex get_default_input_device ();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue