mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-05-06 19:40:10 +02:00
Add getters for channel counts in audio buffers
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user