add a channel mask to AudioBackend

This can be used to identify channels not to be used during
auto-connect, particularly for livetrax
This commit is contained in:
Paul Davis 2024-04-05 14:57:02 -06:00
parent c1b8e035e5
commit 1e75c2b095
2 changed files with 16 additions and 0 deletions

View File

@ -338,6 +338,10 @@ public:
return false;
}
typedef std::vector<bool> ChannelMask;
ChannelMask const & input_channel_mask() const { return _input_channel_mask; }
ChannelMask const & output_channel_mask() const { return _output_channel_mask; }
/** Returns a collection of float identifying sample rates that are
* potentially usable with the hardware identified by \p device .
* Any of these values may be supplied in other calls to this backend
@ -859,6 +863,11 @@ protected:
AudioEngine& engine;
virtual int _start (bool for_latency_measurement) = 0;
void setup_channel_masks (size_t in, size_t out);
ChannelMask _input_channel_mask;
ChannelMask _output_channel_mask;
};
} // namespace ARDOUR

View File

@ -111,4 +111,11 @@ AudioBackend::get_standard_device_name (StandardDeviceName device_name)
return std::string();
}
void
AudioBackend::setup_channel_masks (size_t in, size_t out)
{
_input_channel_mask.assign (in, true);
_output_channel_mask.assign (out, true);
}
} // namespace ARDOUR