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