wip: continious sound

This commit is contained in:
2023-08-09 23:13:08 +04:00
parent c63db4fa07
commit c16447f30e
6 changed files with 38 additions and 31 deletions

View File

@@ -9,7 +9,7 @@ struct Adder {
static std::vector<float>&
SumOscillators(const std::vector<Oscillator*>& oscillators,
float duration) {
size_t sample_count = (size_t)(duration * SAMPLE_RATE);
size_t sample_count = (size_t)(1.f/FPS * SAMPLE_RATE);
std::vector<float>* output = new std::vector<float>();
output->reserve(sample_count);