mirror of
https://github.com/thepigeongenerator/sdl_template.git
synced 2025-12-17 05:55:47 +01:00
fix: did not update the conversion length to the correct new length
This commit is contained in:
@@ -91,7 +91,7 @@ static int8_t audio_cvt(audiodevice const* dev, SDL_AudioSpec const* spec, uint8
|
||||
}
|
||||
|
||||
// update output
|
||||
*len = cvt.len; // set the length to the new length after the conversion
|
||||
*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
|
||||
if (*bufptr == NULL) {
|
||||
warn("%s:%u something went wrong whilst shrinking the audio buffer whilst converting!", __FILE_NAME__, __LINE__);
|
||||
|
||||
Reference in New Issue
Block a user