mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 04:44:11 +02:00
do sample size arithmetic before scaling by sizeof
This commit is contained in:
parent
935b5ab5b3
commit
57797329d1
1 changed files with 1 additions and 1 deletions
|
@ -230,7 +230,7 @@ int AudioScope::addSilenceToScope(QByteArray* byteArray, int frameOffset, int si
|
|||
int samplesToBufferEnd = _samplesPerScope - frameOffset;
|
||||
if (silentSamples > samplesToBufferEnd) {
|
||||
memset(destination + frameOffset, 0, samplesToBufferEnd * sizeof(int16_t));
|
||||
memset(destination, 0, silentSamples - samplesToBufferEnd * sizeof(int16_t));
|
||||
memset(destination, 0, (silentSamples - samplesToBufferEnd) * sizeof(int16_t));
|
||||
} else {
|
||||
memset(destination + frameOffset, 0, silentSamples * sizeof(int16_t));
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue