Open Semphriss opened 3 years ago
I replaced the main menu theme.ogg with this sound and couldn't here a difference between playing it in SuperTux and in Audacious.
Normal audio (played using Totem, Ubuntu 20.04's default media player) vs in-game audio (using play_music()
on the raw OGG file)
When I use play_music ((script "play_music(\"music/rain.ogg\");")
), I cannot hear the quality difference, but I can clearly hear the differences in your audio-diff.mp4. Even though I cannot hear the difference in my case, the spectrum of the sound differs a lot from the sound played by Audacious.
game_vs_audacious.opus.zip
The file has 24 kHz sampling frequency and in the in-game case more high frequencies appear, so perhaps there's a resampling problem. What happens if you re-encode the file with 44.1 kHz or 8 kHz?
Spectrum of your audio-diff.mp4 file:
Spectrum of my game_vs_audacious.wav file (before encoding it to opus):
I tried resampling the file manually at 8, 24, 44.1 and 48 kHz with FFmpeg. They all sounded the same (crystal clear in media player and compressed in-game), except 8 kHz which sounded compressed in the media player too. I notice that in-game 8 kHz sounds more bitcrushed than compressed, though.
For the info, the recording was done with OBS @ 48kHz.
Also, the file has a bitrate of 112kbps, though I don't think it'd be a problem since bitrate varies a lot though game files (Quick search showed 96 to 160 kbps).
For the record, I tried resampling with Audacity instead; same result.
I tried it in .wav format and set the OpenAL resampler to bsinc12 in the alsoftrc configuration file, and the spectrum still looked wrong.
rain.zip
Opening the sound file above in a generic sound player vs playing it in-game shows a clear, distinct difference in quality.