Change scale factor to 32767 (#2056)

This commit is contained in:
yourengod
2025-03-26 10:44:49 +08:00
committed by GitHub
parent 823e2e6257
commit bd61c1d8e5

View File

@@ -63,7 +63,7 @@ void WriteWave(char *buffer, int32_t sampling_rate, const float *samples,
std::vector<int16_t> samples_int16(n);
for (int32_t i = 0; i != n; ++i) {
samples_int16[i] = samples[i] * 32676;
samples_int16[i] = samples[i] * 32767;
}
memcpy(buffer, &header, sizeof(WaveHeader));