Skip to content

Commit

Permalink
Temp fix for acm sound length
Browse files Browse the repository at this point in the history
len_ratio is 0 making all sounds length 0
  • Loading branch information
MrCool92 committed May 21, 2022
1 parent e4ca958 commit e58aed1
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/Audio/Mixer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,12 @@ namespace Falltergeist
SDL_ConvertAudio(&cvt);

// make SDL_mixer chunk
#if defined(_WIN32) || defined(WIN32)
// TODO: look into why cvt.len_ratio is 0 - probably SDL bug?
chunk = Mix_QuickLoad_RAW(cvt.buf, cvt.len_cvt);
#else
chunk = Mix_QuickLoad_RAW(cvt.buf, static_cast<uint32_t>(cvt.len * cvt.len_ratio));
#endif
// TODO: make this configurable
if (_sfx.size() > 100) {
Mix_FreeChunk(_sfx.begin()->second);
Expand Down

0 comments on commit e58aed1

Please sign in to comment.