mirror of
https://github.com/thepigeongenerator/tetris_clone.git
synced 2025-12-17 14:05:45 +01:00
fix: use cvt.len_cvt for new length instead of cvt.len
This commit is contained in:
@@ -92,6 +92,7 @@ static int8_t audio_cvt(audiodevice const* dev, SDL_AudioSpec const* spec, uint8
|
|||||||
|
|
||||||
|
|
||||||
// update output
|
// update output
|
||||||
|
*len = cvt.len_cvt; // set the length to the new length after the conversion
|
||||||
*bufptr = realloc(cvt.buf, cvt.len_cvt); // reallocate the buffer to the new size
|
*bufptr = realloc(cvt.buf, cvt.len_cvt); // reallocate the buffer to the new size
|
||||||
if (*bufptr == NULL) {
|
if (*bufptr == NULL) {
|
||||||
warn("%s:%u something went wrong whilst shrinking the audio buffer whilst converting!", __FILE_NAME__, __LINE__);
|
warn("%s:%u something went wrong whilst shrinking the audio buffer whilst converting!", __FILE_NAME__, __LINE__);
|
||||||
|
|||||||
Reference in New Issue
Block a user