Skip to content

Commit

Permalink
load_voc.c: fix spec losing retrieved frequency
Browse files Browse the repository at this point in the history
(Was somehow broken by commit 6c4e80c)
Fixes #593
  • Loading branch information
sezero committed Feb 19, 2024
1 parent 087004f commit 6aebc4e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/codecs/load_voc.c
Original file line number Diff line number Diff line change
Expand Up @@ -413,6 +413,7 @@ SDL_AudioSpec *Mix_LoadVOC_RW (SDL_RWops *src, SDL_bool freesrc,
v.rate = VOC_BAD_RATE;
v.rest = 0;
v.has_extended = 0;
SDL_zerop(spec);

if (!voc_get_block(src, &v, spec)) {
goto done;
Expand All @@ -428,7 +429,6 @@ SDL_AudioSpec *Mix_LoadVOC_RW (SDL_RWops *src, SDL_bool freesrc,
goto done;
}

SDL_zerop(spec);
spec->format = ((v.size == ST_SIZE_WORD) ? SDL_AUDIO_S16 : SDL_AUDIO_U8);
if (spec->channels == 0) {
spec->channels = v.channels;
Expand Down

0 comments on commit 6aebc4e

Please sign in to comment.