Finish implementing YaAudioBusBuffers

This commit is contained in:
Robbert van der Helm
2020-12-15 22:32:42 +01:00
parent 487e6eac98
commit f1aefc0a9d
3 changed files with 106 additions and 1 deletions
+11 -1
View File
@@ -57,9 +57,11 @@ class YaAudioBusBuffers {
* call. Constructed as part of `YaProcessData`. Since `AudioBusBuffers`
* contains an untagged union for storing single and double precision
* floating point values, the original `ProcessData`'s `symbolicSampleSize`
* field determines which variant of that union to use.
* field determines which variant of that union to use. Similarly the
* `ProcessData`' `numSamples` field determines the extent of these arrays.
*/
YaAudioBusBuffers(Steinberg::Vst::SymbolicSampleSizes sample_size,
int32 num_samples,
const Steinberg::Vst::AudioBusBuffers& data);
/**
@@ -94,6 +96,14 @@ class YaAudioBusBuffers {
*/
Steinberg::Vst::AudioBusBuffers reconstructed_buffers;
// Used in reconstructed_buffers, because we need to store pointers to the
// inner vectors in `buffers`. We're using a union instead of void pointers
// here to have at least some resemblance of type safety.
union {
std::vector<float*> float_buffer_pointers;
std::vector<double*> double_buffer_pointers;
};
/**
* A bitfield for silent channels copied directly from the input struct.
*/