Added SDL_AUDIO_BYTESIZE

This commit is contained in:
Brick authored and Sam Lantinga committed 2023-09-05 17:56:58 -07:00
1 parent 544351c98e
commit 53122593f8
12 files changed
+21 -20

No files matched your search

+1 -1
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)) {