We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
speed_up
phase_vocoder*
1 parent 9ed11f3 commit 43d078fCopy full SHA for 43d078f
examples/common.h
@@ -185,7 +185,7 @@ class wav_writer {
185
// It is assumed that PCM data is normalized to a range from -1 to 1
186
bool write_audio(const float * data, size_t length) {
187
for (size_t i = 0; i < length; ++i) {
188
- const int16_t intSample = data[i] * 32767;
+ const int16_t intSample = int16_t(data[i] * 32767);
189
file.write(reinterpret_cast<const char *>(&intSample), sizeof(int16_t));
190
dataSize += sizeof(int16_t);
191
}
0 commit comments