| Summary: | Regression: OGG playback distorted at samplerate mismatch | ||
|---|---|---|---|
| Product: | SDL_mixer | Reporter: | Fabian Greffrath <fabian+debian> |
| Component: | misc | Assignee: | Ryan C. Gordon <icculus> |
| Status: | RESOLVED FIXED | QA Contact: | Sam Lantinga <slouken> |
| Severity: | normal | ||
| Priority: | P2 | ||
| Version: | 2.0.0 | ||
| Hardware: | x86_64 | ||
| OS: | Linux | ||
| Attachments: | Ogg data, Vorbis audio, stereo, 32000 Hz | ||
Before writing the last paragraph I should have added that both playmus applications fail to recognoze the correct sample rate of the OGG file and assume it to be 22.05kHz instead: $ ./playmus1.2 d_dm2ttl.lmp.ogg Opened audio at 22050 Hz 16 bit stereo (LE), 4096 bytes audio buffer Playing d_dm2ttl.lmp.ogg $ ./playmus2.0 d_dm2ttl.lmp.ogg Opened audio at 22050 Hz 16 bit stereo (LE), 4096 bytes audio buffer Playing d_dm2ttl.lmp.ogg I am afraid this doesn't help too much, but "hg bisect" has now told me twice in a row that "Changeset 578: Switched from SDL_mixer to SDL2_mixer" is the culprit. This is a known bug in SDL's internal resampler (not SDL_mixer), and we're hoping to fix this soon (but not for 2.0.4). --ryan. This is fixed in SDL 2.0.7 with Ryan's resampling work. Thanks! |
Created attachment 2051 [details] Ogg data, Vorbis audio, stereo, 32000 Hz Hi there, I think I have found a regression in SDL_mixer regarding playback of OGG files: I try to playback the following file, which is also attached to this report: $ file d_dm2ttl.lmp.ogg d_dm2ttl.lmp.ogg: Ogg data, Vorbis audio, stereo, 32000 Hz, ~64000 bps, created by: Xiph.Org libVorbis I Please note that the sample rate of this file is 32kHz. When using the playmus application linked against SDL_mixer 1.2, the sound is played back slower than expected, but it sounds clean and undistorted. When using the playmus application linked against SDL_mixer 2.0, the sound is distorted beyond recognition. It plays back perfectly fine in both cases if I manually pass a samplerate to the playmus application. Summary: playmus1.2 d_dm2ttl.lmp.ogg: too slow, but clean playmus2.0 d_dm2ttl.lmp.ogg: distorted garbage playmus1.2 -r 32000 d_dm2ttl.lmp.ogg: perfect playmus2.0 -r 32000 d_dm2ttl.lmp.ogg: perfect So, maybe there are actually two bugs in this: (1) Mix_PlayMusic (or Mix_FadeInMusic in this specific case) is not able to recognize to correct sample rate for the OGG file in both versions 1.2 and 2.0 and (2) once it fails to do so, it plays unrecognozable garbage in version 2.0. Cheers, Fabian