mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-05-10 04:30:12 +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);
|
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
|
* 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
|
* stored in. Both the bus and the channel indices start at zero. These
|
||||||
|
|||||||
Reference in New Issue
Block a user