mirror of
https://github.com/lubosz/overte.git
synced 2025-04-23 11:33:44 +02:00
fix AudioRingBuffer::appendData
This commit is contained in:
parent
3d526a1024
commit
1c5228cb6d
1 changed files with 3 additions and 3 deletions
|
@ -135,17 +135,17 @@ int AudioRingBufferTemplate<T>::appendData(char *data, int maxSize) {
|
|||
|
||||
// read to the end of the buffer
|
||||
for (int i = 0; i < numSamplesToEnd; i++) {
|
||||
*dest++ = *output++;
|
||||
*dest++ += *output++;
|
||||
}
|
||||
|
||||
// read the rest from the beginning of the buffer
|
||||
output = _buffer;
|
||||
for (int i = 0; i < (numReadSamples - numSamplesToEnd); i++) {
|
||||
*dest++ = *output++;
|
||||
*dest++ += *output++;
|
||||
}
|
||||
} else {
|
||||
for (int i = 0; i < numReadSamples; i++) {
|
||||
*dest++ = *output++;
|
||||
*dest++ += *output++;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue