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 - SDL2_mixer 2.0.0 ogg playback is partly broken?
Summary: SDL2_mixer 2.0.0 ogg playback is partly broken?
Status: RESOLVED DUPLICATE of bug 58
Alias: None
Product: SDL_mixer
Classification: Unclassified
Component: misc (show other bugs)
Version: 2.0.0
Hardware: x86_64 Linux
: P2 normal
Assignee: Ryan C. Gordon
QA Contact: Ryan C. Gordon
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-07-17 12:37 UTC by Tomas Ukkonen
Modified: 2016-01-03 21:01 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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 ***