Added SDL_AUDIO_BYTESIZE

This commit is contained in:
Brick
2023-09-05 23:02:37 +01:00
committed by Sam Lantinga
parent 544351c98e
commit 53122593f8
12 changed files with 21 additions and 20 deletions

View File

@@ -292,7 +292,7 @@ static void loop(void)
if (SDL_GetAudioStreamFormat(stream, &src_spec, &dst_spec) == 0) {
available_bytes = SDL_GetAudioStreamAvailable(stream);
available_seconds = (float)available_bytes / (float)(SDL_AUDIO_BITSIZE(dst_spec.format) / 8 * dst_spec.freq * dst_spec.channels);
available_seconds = (float)available_bytes / (float)(SDL_AUDIO_BYTESIZE(dst_spec.format) * dst_spec.freq * dst_spec.channels);
/* keep it looping. */
if (auto_loop && (available_seconds < 10.0f)) {