README.txt
author Sam Lantinga <slouken@libsdl.org>
Sat, 23 Aug 2014 10:57:26 -0700
changeset 696 9599bb0ff844
parent 646 72383ae2d2e7
child 777 92882ef2ab81
permissions -rw-r--r--
Fixed bug 2690 - Floating point exception in Mix_Volume()

Francisco de la Peña

This happens rarely under uncertain circunstances, as it doesn't crash always and does it randomly. Fortunately, I've got a backtrace when running a GDB session. Might be a divide by zero issue in SDL or SDL_mixer.

Program received signal SIGFPE, Arithmetic exception.
0x00000038e8c08a7d in mix_channels (udata=<optimized out>, stream=0x24e11b0 "", len=2048) at mixer.c:345
345 Mix_Volume(i, (mix_channel[i].fade_volume * ticks) / mix_channel[i].fade_length );
(gdb) bt f
#0 0x00000038e8c08a7d in mix_channels (udata=<optimized out>, stream=0x24e11b0 "", len=2048) at mixer.c:345
ticks = 0
mix_input = <optimized out>
i = 0
mixable = <optimized out>
volume = <optimized out>
sdl_ticks = 129373

Using SDL 2.0.3 and SDL_Mixer 2.0.0, PulseAudio, Fedora 20 x86_64 but looks like can be reproduced on other platforms.
     1 
     2 SDL_mixer 2.0
     3 
     4 The latest version of this library is available from:
     5 http://www.libsdl.org/projects/SDL_mixer/
     6 
     7 Due to popular demand, here is a simple multi-channel audio mixer.
     8 It supports 8 channels of 16 bit stereo audio, plus a single channel
     9 of music, mixed by the popular MikMod MOD, Timidity MIDI and SMPEG MP3
    10 libraries.
    11 
    12 See the header file SDL_mixer.h and the examples playwave.c and playmus.c
    13 for documentation on this mixer library.
    14 
    15 The mixer can currently load Microsoft WAVE files and Creative Labs VOC
    16 files as audio samples, and can load MIDI files via Timidity and the
    17 following music formats via MikMod:  .MOD .S3M .IT .XM. It can load
    18 Ogg Vorbis streams as music if built with Ogg Vorbis or Tremor libraries,
    19 and finally it can load MP3 music using the SMPEG or libmad libraries.
    20 
    21 Tremor decoding is disabled by default; you can enable it by passing
    22 	--enable-music-ogg-tremor
    23 to configure, or by defining OGG_MUSIC and OGG_USE_TREMOR.
    24 
    25 libmad decoding is disabled by default; you can enable it by passing
    26 	--enable-music-mp3-mad
    27 to configure, or by defining MP3_MAD_MUSIC
    28 vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
    29 WARNING: The license for libmad is GPL, which means that in order to
    30          use it your application must also be GPL!
    31 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    32 
    33 The process of mixing MIDI files to wave output is very CPU intensive,
    34 so if playing regular WAVE files sound great, but playing MIDI files
    35 sound choppy, try using 8-bit audio, mono audio, or lower frequencies.
    36 
    37 To play MIDI files, you'll need to get a complete set of GUS patches
    38 from:
    39 http://www.libsdl.org/projects/mixer/timidity/timidity.tar.gz
    40 and unpack them in /usr/local/lib under UNIX, and C:\ under Win32.
    41 
    42 This library is under the zlib license, see the file "COPYING.txt" for details.
    43