Added SDL_AUDIO_FRAMESIZE

This commit is contained in:
Brick authored and Sam Lantinga committed 2023-09-05 17:56:58 -07:00
1 parent 53122593f8
commit f2ca9a615b
11 files changed
+29 -33

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_BYTESIZE(dst_spec.format) * dst_spec.freq * dst_spec.channels);
available_seconds = (float)available_bytes / (float)(SDL_AUDIO_FRAMESIZE(dst_spec) * dst_spec.freq);
/* keep it looping. */
if (auto_loop && (available_seconds < 10.0f)) {