Add getters for channel counts in audio buffers

This commit is contained in:
Robbert van der Helm
2021-06-11 13:38:29 +02:00
parent 340d376564
commit a7d8063db4
+8
View File
@@ -134,6 +134,14 @@ class AudioShmBuffer {
*/
void resize(const Config& new_config);
inline size_t num_input_channels(const uint32_t bus) const {
return config.input_offsets[bus].size();
}
inline size_t num_output_channels(const uint32_t bus) const {
return config.output_offsets[bus].size();
}
/**
* Get a pointer to the part of the buffer where this input audio channel is
* stored in. Both the bus and the channel indices start at zero. These