forum

How does osu! handle MP3 decoding?

posted
Total Posts
3
Topic Starter
shawnachu
I'm creating a standalone application that attempts to load existing osu! beatmaps.

If I were to load a beatmap's mp3 file into Audacity, then compare the waveforms with the timing of each note, you can notice a significant gap in between the note timing and the song timing. This discrepancy is not present when the beatmap is played in-game:



The reason for this gap is because the decoder needs to pad the mp3 data when decoding. Different files will have different padding, so the issue is sometimes less prevalent on specific beatmaps: https://superuser.com/questions/938782/audacity-adds-a-gap-when-exporting-mp3

Thus, the timings listed in the beatmap file are specific to osu!'s mp3 decoder and how it handles mp3 playback. There is no guarantee

My question is: does osu! do any post-processing to rectify the mp3 gap issue? If not, what decoder does osu! use, and can I accurately predict how much padding I need to account for?

I know this is a niche issue but I'm not sure where to ask this question other than here.
miniant
There's an open issue on osu!lazer git repo regarding beatmap audio offset: https://github.com/ppy/osu/issues/1616.

Maybe this will help.
Topic Starter
shawnachu
Somewhat, but it looks like the issue isn't resolved in osu!lazer yet? Seems like the only perfect option is to use the old version of bass.dll.

I'm thinking about some sort of algorithm to try to estimate the offset using the highest amplitude sample by each node, which might work out. I'll give it a shot unless I someone has a better idea.
Please sign in to reply.

New reply