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 2517 - SDL2_mixer appears to not properly handle wav with frequency not matching MIX_OpenAudio argument
Summary: SDL2_mixer appears to not properly handle wav with frequency not matching MIX...
Status: RESOLVED FIXED
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: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-05-01 03:31 UTC by pcpa
Modified: 2017-10-21 19:35 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description pcpa 2014-05-01 03:31:12 UTC
$ rpm -q SDL2_mixer
SDL2_mixer-2.0.0-3.fc21.x86_64

I am making bindings to SDL2 and OpenGL to a language, and
to "validate" it, translating NeHe tutorials.
The sound in lesson 32 shows the problem.
http://nehe.gamedev.net/tutorial/picking_alpha_blending_alpha_testing_sorting/16005/

The problem does not happen with SDL_mixer 1.2, example:

$ file nehe/lesson32/Shot.wav
nehe/lesson32/Shot.wav: RIFF (little-endian) data, WAVE audio, Microsoft PCM, 8 bit, mono 22000 Hz

<<< works correctly >>>
$ playwave nehe/lesson32/Shot.wav 
Opened audio at 22050 Hz 16 bit stereo

<< plays only noise >>>
$ playwave2 nehe/lesson32/Shot.wav 
Opened audio at 22050 Hz 16 bit stereo

But I managed to get it to play correctly with SDL2 by passing
22000 instead of (MIX_DEFAULT_FREQUENCY) 22050 as first argument
to MIX_OpenAudio.
Comment 1 Francisco de la Peña 2014-09-23 16:45:55 UTC
I guess this is a duplicate of bug #2389
Try with latest SDL Hg or wait until the SDL 2.0.4 release.
Comment 2 Sam Lantinga 2017-10-21 19:35:44 UTC
Yes, this is fixed for the next release, thanks!