Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch audio assets to Opus #167

merged 4 commits into from May 11, 2019


None yet
1 participant
Copy link

commented May 8, 2019

This reduces the distribution size by about 20 megabytes, which is particularly nice for the web version. The music has been encoded from the original lossless source, so there's no generational loss. In fact, an increase in fidelity is likely. Unfortunately there is no lossless source for the sound effects, so they had to be re-encoded from the Vorbis files. I did not notice any regressions in quality, though.

Dependencies changes:

  • SDL2_mixer version requirement raised to 2.0.4 to support streaming of Opus music.
  • Explicit dependency on opusfile to load Opus SFX chunks (SDL2_mixer is too dumb to do that apparently).
  • SDL2 version requirement raised to 2.0.6, because the SDL_AudioStream API is used to resample the Opus SFX if needed.

It is possible to avoid bumping the SDL2_mixer version requirement by implementing Opus streaming manually via Mix_HookMusic, but that's a pain in the ass and not worth the effort in my opinion.

Akaricchi added some commits May 2, 2019

Switch BGMs to Opus
SFX are TODO. SDL2_Mixer can not decode opus chunks (because OF COURSE
it can't); we probably should at least resample them to 48k.
bump SDL2 version requirement to 2.0.6
2.0.5 doesn't have the SDL_AudioStream API, and is ancient anyway.

@Akaricchi Akaricchi added this to the v1.3.x milestone May 8, 2019

@Akaricchi Akaricchi merged commit b0856ce into master May 11, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.