renderer: switched audio rendering over to planar buffers
While planar audio cannot be used for playback, it's much easier for processing. This should lead to cleaner and easier to write code in the future.
This commit is contained in:
@@ -46,11 +46,13 @@ NodeInput *VolumeNode::ProcessesSamplesFrom() const
|
||||
return samples_input_;
|
||||
}
|
||||
|
||||
void VolumeNode::ProcessSamples(const NodeValueDatabase *values, const AudioRenderingParams& params, const float* input, float* output, int index) const
|
||||
void VolumeNode::ProcessSamples(const NodeValueDatabase *values, const AudioRenderingParams& params, const SampleBufferPtr input, SampleBufferPtr output, int index) const
|
||||
{
|
||||
float volume_val = (*values)[volume_input_].Get(NodeParam::kFloat).toFloat();
|
||||
|
||||
output[index] = input[index] * volume_val;
|
||||
for (int i=0;i<params.channel_count();i++) {
|
||||
output->data()[i][index] = input->data()[i][index] * volume_val;
|
||||
}
|
||||
}
|
||||
|
||||
void VolumeNode::Retranslate()
|
||||
|
||||
Reference in New Issue
Block a user