diff --git a/src/unix/sound.cpp b/src/unix/sound.cpp index 53e3f31240..e0913ee65d 100644 --- a/src/unix/sound.cpp +++ b/src/unix/sound.cpp @@ -669,8 +669,8 @@ bool wxSound::LoadWAV(const void* data_, size_t length, bool copyData) if (waveformat.uiFormatTag != WAVE_FORMAT_PCM) return false; - if (waveformat.ulSamplesPerSec != - waveformat.ulAvgBytesPerSec / waveformat.uiBlockAlign) + if (waveformat.ulAvgBytesPerSec != + waveformat.ulSamplesPerSec * waveformat.uiBlockAlign) return false; // get file size from header