Seeking in a VBR file breaks audio synchronisation
Describe the bug: https://osu.ppy.sh/beatmapsets/43960#osu/156018 At the start of this map(Extra diff) there is a very short skip,~1.5 sec, and if you skip it, you desync the map. The skip doesn't exists in standard, only in lazer. Screenshots or videos showing encountered issue: https://drive.google.com/file/d/1mwYSQgqVcfm-wdRI9kfXSzzu-igTdj2s/view?usp=sharing osu!lazer version: 2020.1031.0
The cause is likely that this beatmap is using an ogg backing track. Looks like seek logic is leaving the track in a different place relative to playing it from the beginning.
Needs further investigation.
I've stared at this for a few hours, and I'm at a loss. All the numbers seem to check out: the seek points all look correct, BASS seems to indicate that the track has a constant bitrate of 176400bps (which may be suspicious, since from what I gather OGG is a variable bitrate format), but audibly - it just... sounds wrong. I can't see any difference between lazer and stable BASS calls that could explain this.
I can even notice something wrong happening on the music controller - see this video: when I seek back the track clearly doesn't return to the point at which it was. What's even weirder, VLC seems to behave extremely similarly. Which makes me worried as I had thought it was the gold standard in this sort of thing.
So I don't know what to do about this one. I can't find fault with anything on our side; it might be needed to take this upstream to un4seen. Weirdest part is that this apparently works on stable just fine...
I've stared at this for a few hours, and I'm at a loss. All the numbers seem to check out: the seek points all look correct, BASS seems to indicate that the track has a constant bitrate of 176400bps (which may be suspicious, since from what I gather OGG is a variable bitrate format), but audibly - it just... sounds wrong. I can't see any difference between lazer and stable BASS calls that could explain this.
I can even notice something wrong happening on the music controller - see this video: when I seek back the track clearly doesn't return to the point at which it was. What's even weirder, VLC seems to behave extremely similarly. Which makes me worried as I had thought it was the gold standard in this sort of thing.
So I don't know what to do about this one. I can't find fault with anything on our side; it might be needed to take this upstream to un4seen. Weirdest part is that this apparently works on stable just fine...
PotPlayer shows its bitrate is various.
General
Complete name : C:\Users\PercyDan\Downloads\Illumiscape.ogg
Format : Ogg
File size : 2.82 MiB
Duration : 2 min 7 s
Overall bit rate mode : Variable
Overall bit rate : 186 kb/s
Track name : _14a
Track name/Position : 1
Description : www.dvdvideosoft.com
Recorded date : 2012
Writing application : Lavf53.7.0
Audio
ID : 2288052755 (0x8860EA13)
Format : Vorbis
Format settings, Floor : 1
Duration : 2 min 7 s
Bit rate mode : Variable
Bit rate : 192 kb/s
Channel(s) : 2 channels
Sampling rate : 44.1 kHz
Compression mode : Lossy
Stream size : 2.91 MiB
Writing library : Lavf53.7.0

I checked stable and the reason it's not an issue on stable is that there isn't a skip in stable.
Seems then that seeking in VBR is indeed broken. BASS docs mention something that ChannelSeconds2Bytes translation is based "on the channel's initial sample rate, when it was created", but that would imply that there is seemingly no way to translate between real time and byte position for VBR files? Which I find hard to believe, frankly.
PRESCAN flag should be enough to handle this, but it may not be correctly implemented for ogg. I can't find any references or people reporting similar issues.
Also note reports like https://github.com/ppy/osu/discussions/16661 which indicate that waveforms may also fail to generate for VBR tracks.