Add API to enforce valid device selection.
This commit is contained in:
parent
5bf8a5537b
commit
335debfa2f
@ -202,6 +202,14 @@ class LIBARDOUR_API AudioBackend : public PortEngine {
|
||||
*/
|
||||
virtual bool use_separate_input_and_output_devices () const { return false; }
|
||||
|
||||
/* Return true if the backend uses separate I/O devices only for the case
|
||||
* of allowing one to be "None".
|
||||
*
|
||||
* ie. Input Device must match Output Device, except if either of them
|
||||
* is get_standard_device_name (DeviceNone).
|
||||
*/
|
||||
virtual bool match_input_output_devices_or_none () const { return false; }
|
||||
|
||||
/** Returns a collection of DeviceStatuses identifying devices discovered
|
||||
* by this backend since the start of the process.
|
||||
*
|
||||
|
@ -172,6 +172,7 @@ class AlsaAudioBackend : public AudioBackend {
|
||||
bool is_realtime () const;
|
||||
|
||||
bool use_separate_input_and_output_devices () const { return true; }
|
||||
bool match_input_output_devices_or_none () const { return true; }
|
||||
bool can_set_period_size () const { return true; }
|
||||
|
||||
std::vector<DeviceStatus> enumerate_devices () const;
|
||||
|
@ -179,6 +179,7 @@ class PortAudioBackend : public AudioBackend {
|
||||
bool get_use_buffered_io () { return _use_blocking_api; }
|
||||
|
||||
bool use_separate_input_and_output_devices () const;
|
||||
bool match_input_output_devices_or_none () const { return true; }
|
||||
std::vector<DeviceStatus> enumerate_devices () const;
|
||||
std::vector<DeviceStatus> enumerate_input_devices () const;
|
||||
std::vector<DeviceStatus> enumerate_output_devices () const;
|
||||
|
Loading…
Reference in New Issue
Block a user