We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 2649

Summary: SDL2_mixer 2.0.0 ogg playback is partly broken?
Product: SDL_mixer Reporter: Tomas Ukkonen <nop>
Component: miscAssignee: Ryan C. Gordon <icculus>
Status: RESOLVED DUPLICATE QA Contact: Ryan C. Gordon <icculus>
Severity: normal    
Priority: P2 CC: philipp.wiesemann
Version: 2.0.0   
Hardware: x86_64   
OS: Linux   

Description Tomas Ukkonen 2014-07-17 12:37:09 UTC
SDL2_mixer ogg playback do not work correctly when a playback frequency is different from the sampling rate. 

Wav files encoded with oggenc play ok with mplayer but have lots of noise if played with SDL2_mixer. The exactly same code works ok with mp3 files or with ogg files when the sampling frequency is same as the playback frequency.

The code I use for playback is:

(init)

Mix_OpenAudio(44100, MIX_DEFAULT_FORMAT, 2, 4096);
tracks[track] = Mix_LoadMUS(sounds[track].c_str());
Mix_FadeInMusic(tracks[track], -1, 1000);

(deinit)

The difference with oggs that play OK are that they have 44100 sampling frequency and ogg's that play incorrectly have 48000 sampling frequency. Now, if I change playback frequency to 48000 in Mix_OpenAudio() the playback is now ok with oggs having sampling frequency 48000 but garbled with 44100.

Platform:
VirtualBox (3 core intel i7, 1 GB RAM)
Linux 3.2.0-4-amd64 #1 SMP Debian (testing) 3.2.60-1+deb7u1 x86_64 GNU/Linux (64bit)

SDL2_mixer build from the tarball.
Comment 1 Ryan C. Gordon 2016-01-03 21:01:30 UTC
This is a bug in SDL, not SDL_mixer. We intend to fix this for SDL 2.0.5.

--ryan.

*** This bug has been marked as a duplicate of bug 58 ***