SDL2_mixer.spec.in
author Sam Lantinga <slouken@libsdl.org>
Sat, 23 Aug 2014 10:57:26 -0700
changeset 696 9599bb0ff844
parent 656 675972b59b6d
child 901 253f50984a9a
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 %define name SDL2_mixer
     2 %define version @VERSION@
     3 %define release 1
     4 
     5 Summary: Simple DirectMedia Layer - Sample Mixer Library
     6 Name: %{name}
     7 Version: %{version}
     8 Release: %{release}
     9 Source0: %{name}-%{version}.tar.gz
    10 License: LGPL
    11 Group: System Environment/Libraries
    12 BuildRoot: /var/tmp/%{name}-buildroot
    13 Prefix: %{_prefix}
    14 
    15 %description
    16 Due to popular demand, here is a simple multi-channel audio mixer.
    17 It supports 4 channels of 16 bit stereo audio, plus a single channel
    18 of music, mixed by the popular MikMod MOD, Timidity MIDI, Ogg Vorbis,
    19 Tremor, SMPEG MP3, and libmad MP3 libraries.
    20 
    21 %package devel
    22 Summary: Libraries, includes and more to develop SDL applications.
    23 Group: Development/Libraries
    24 Requires: %{name}
    25 
    26 %description devel
    27 Due to popular demand, here is a simple multi-channel audio mixer.
    28 It supports 4 channels of 16 bit stereo audio, plus a single channel
    29 of music, mixed by the popular MikMod MOD, Timidity MIDI, Ogg Vorbis,
    30 Tremor, SMPEG MP3, and libmad MP3 libraries.
    31 
    32 %prep
    33 %setup 
    34 
    35 %build
    36 CFLAGS="$RPM_OPT_FLAGS" ./configure --prefix=%{prefix}
    37 make
    38 
    39 %install
    40 rm -rf $RPM_BUILD_ROOT
    41 make install prefix=$RPM_BUILD_ROOT/%{prefix}
    42 
    43 %clean
    44 rm -rf $RPM_BUILD_ROOT
    45 
    46 %files
    47 %defattr(-,root,root)
    48 %doc README.txt CHANGES.txt COPYING.txt
    49 %{prefix}/lib/lib*.so.*
    50 
    51 %files devel
    52 %defattr(-,root,root)
    53 %{prefix}/lib/lib*.a
    54 %{prefix}/lib/lib*.la
    55 %{prefix}/lib/lib*.so
    56 %{prefix}/include/*/
    57 %{prefix}/lib/pkgconfig/*.pc
    58 
    59 %changelog
    60 * Wed Jan 19 2000 Sam Lantinga 
    61 - converted to get package information from configure
    62 * Sun Jan 16 2000 Hakan Tandogan <hakan@iconsult.com>
    63 - initial spec file
    64