Skip to content
Snippets Groups Projects
Commit 3302efc3 authored by David Huss's avatar David Huss :speech_balloon:
Browse files

Use mul_add for slight precision gain

parent e04e3638
No related branches found
No related tags found
No related merge requests found
......@@ -16,9 +16,9 @@ TODO:
- [ ] Document dependecies
- [ ] Performance improvements:
- [ ] implement performance monitoring
- [ ] f32.mul_add() or f32.to_bits() / f32.from_bits()
- [x] only calculate connected ports https://docs.rs/jack/0.7.1/jack/struct.Port.html#method.connected_count
- [ ] Flag volume modulations as dirty
- [x] f32.mul_add() or f32.to_bits() / f32.from_bits()
- [x] only calculate connected ports https://docs.rs/jack/0.7.1/jack/struct.Port.html#method.connected_count
- [x] Support other Buffers than 1024
- [ ] Features:
- [ ] Flags to control printing (--quiet etc)
......@@ -188,7 +188,7 @@ fn main() {
// Multiply each input sample at position `sample_index` with the
// volume and sum it with the corresponding (existing) output sample
// at the same position
*sample += input_samples[sample_index] * volume;
*sample = input_samples[sample_index].mul_add(volume, *sample);
}
});
});
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment