Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 380290 Details for
Bug 488200
media-libs/sdl-mixer-1.2.12: cherry-pick a few fixes from 2.0 branch
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
another update (rev8ef083375857 )
sdl-mixer-1.2.12-acc-hgfixes.patch (text/plain), 6.79 KB, created by
Rafał Mużyło
on 2014-07-06 07:35:52 UTC
(
hide
)
Description:
another update (rev8ef083375857 )
Filename:
MIME Type:
Creator:
Rafał Mużyło
Created:
2014-07-06 07:35:52 UTC
Size:
6.79 KB
patch
obsolete
>As of https://hg.libsdl.org/SDL_mixer/rev/8ef083375857 >Includes fixes only in 2.0 branch > >diff -dupr SDL_mixer-1.2.12-old/fluidsynth.c SDL_mixer-1.2.12/fluidsynth.c >--- SDL_mixer-1.2.12-old/fluidsynth.c 2012-01-15 23:01:05.000000000 +0100 >+++ SDL_mixer-1.2.12/fluidsynth.c 2013-10-05 07:54:44.897400366 +0200 >@@ -177,7 +177,7 @@ int fluidsynth_active(FluidSynthMidiSong > void fluidsynth_setvolume(FluidSynthMidiSong *song, int volume) > { > /* FluidSynth's default is 0.2. Make 0.8 the maximum. */ >- fluidsynth.fluid_synth_set_gain(song->synth, (float) (volume * 0.00625)); >+ fluidsynth.fluid_synth_set_gain(song->synth, (float) (volume * 1.2 / MIX_MAX_VOLUME)); > } > > int fluidsynth_playsome(FluidSynthMidiSong *song, void *dest, int dest_len) >diff -dupr SDL_mixer-1.2.12-old/mixer.c SDL_mixer-1.2.12/mixer.c >--- SDL_mixer-1.2.12-old/mixer.c 2013-10-05 07:51:23.000000000 +0200 >+++ SDL_mixer-1.2.12/mixer.c 2013-10-15 02:23:23.022514650 +0200 >@@ -35,6 +35,7 @@ > #include "load_ogg.h" > #include "load_flac.h" > #include "dynamic_flac.h" >+#include "dynamic_fluidsynth.h" > #include "dynamic_mod.h" > #include "dynamic_mp3.h" > #include "dynamic_ogg.h" >@@ -126,7 +127,7 @@ const char *Mix_GetChunkDecoder(int inde > > static void add_chunk_decoder(const char *decoder) > { >- void *ptr = SDL_realloc(chunk_decoders, (num_decoders + 1) * sizeof (const char **)); >+ void *ptr = SDL_realloc(chunk_decoders, (num_decoders + 1) * sizeof (const char *)); > if (ptr == NULL) { > return; /* oh well, go on without it. */ > } >@@ -370,13 +371,15 @@ static void mix_channels(void *udata, Ui > if (mix_input != mix_channel[i].chunk->abuf) > SDL_free(mix_input); > >- --mix_channel[i].looping; >+ if (mix_channel[i].looping > 0) >+ --mix_channel[i].looping; > mix_channel[i].samples = mix_channel[i].chunk->abuf + remaining; > mix_channel[i].playing = mix_channel[i].chunk->alen - remaining; > index += remaining; > } > if ( ! mix_channel[i].playing && mix_channel[i].looping ) { >- --mix_channel[i].looping; >+ if (mix_channel[i].looping > 0) >+ --mix_channel[i].looping; > mix_channel[i].samples = mix_channel[i].chunk->abuf; > mix_channel[i].playing = mix_channel[i].chunk->alen; > } >@@ -1096,14 +1099,14 @@ int Mix_Playing(int which) > > for ( i=0; i<num_channels; ++i ) { > if ((mix_channel[i].playing > 0) || >- (mix_channel[i].looping > 0)) >+ mix_channel[i].looping) > { > ++status; > } > } > } else if ( which < num_channels ) { > if ( (mix_channel[which].playing > 0) || >- (mix_channel[which].looping > 0) ) >+ mix_channel[which].looping ) > { > ++status; > } >diff -dupr SDL_mixer-1.2.12-old/music.c SDL_mixer-1.2.12/music.c >--- SDL_mixer-1.2.12-old/music.c 2012-01-15 23:01:05.000000000 +0100 >+++ SDL_mixer-1.2.12/music.c 2013-10-05 08:56:58.882089786 +0200 >@@ -163,7 +163,7 @@ const char *Mix_GetMusicDecoder(int inde > > static void add_music_decoder(const char *decoder) > { >- void *ptr = SDL_realloc(music_decoders, (num_decoders + 1) * sizeof (const char **)); >+ void *ptr = SDL_realloc(music_decoders, (num_decoders + 1) * sizeof (const char *)); > if (ptr == NULL) { > return; /* oh well, go on without it. */ > } >@@ -210,7 +210,8 @@ static int music_halt_or_loop (void) > if (music_loops) > { > Mix_Fading current_fade; >- --music_loops; >+ if (music_loops > 0) >+ --music_loops; > current_fade = music_playing->fading; > music_internal_play(music_playing, 0.0); > music_playing->fading = current_fade; >@@ -622,6 +623,7 @@ Mix_Music *Mix_LoadMUSType_RW(SDL_RWops > int start = SDL_RWtell(rw); > if (SDL_RWread(rw, magic, 1, 4) != 4) { > Mix_SetError("Couldn't read from RWops"); >+ SDL_free(music); > return MUS_NONE; > } > SDL_RWseek(rw, start, RW_SEEK_SET); >@@ -1283,6 +1285,9 @@ int Mix_HaltMusic(void) > SDL_LockAudio(); > if ( music_playing ) { > music_internal_halt(); >+ if ( music_finished_hook ) { >+ music_finished_hook(); >+ } > } > SDL_UnlockAudio(); > >diff -dupr SDL_mixer-1.2.12-old/music_ogg.c SDL_mixer-1.2.12/music_ogg.c >--- SDL_mixer-1.2.12-old/music_ogg.c 2012-01-15 23:01:05.000000000 +0100 >+++ SDL_mixer-1.2.12/music_ogg.c 2013-10-05 07:59:16.938521366 +0200 >@@ -225,7 +225,7 @@ void OGG_delete(OGG_music *music) > void OGG_jump_to_time(OGG_music *music, double time) > { > #ifdef OGG_USE_TREMOR >- vorbis.ov_time_seek( &music->vf, (ogg_int64_t)time ); >+ vorbis.ov_time_seek( &music->vf, (ogg_int64_t)(time * 1000.0) ); > #else > vorbis.ov_time_seek( &music->vf, time ); > #endif >diff -dupr SDL_mixer-1.2.12-old/native_midi/native_midi_common.c SDL_mixer-1.2.12/native_midi/native_midi_common.c >--- SDL_mixer-1.2.12-old/native_midi/native_midi_common.c 2012-01-15 23:01:05.000000000 +0100 >+++ SDL_mixer-1.2.12/native_midi/native_midi_common.c 2013-10-05 08:52:18.841523928 +0200 >@@ -230,7 +230,7 @@ static MIDIEvent *MIDItoStream(MIDIFile > return NULL; > > track = (MIDIEvent**) calloc(1, sizeof(MIDIEvent*) * mididata->nTracks); >- if (NULL == head) >+ if (NULL == track) > return NULL; > > /* First, convert all tracks to MIDIEvent lists */ >diff -dupr SDL_mixer-1.2.12-old/native_midi/native_midi_haiku.cpp SDL_mixer-1.2.12/native_midi/native_midi_haiku.cpp >--- SDL_mixer-1.2.12-old/native_midi/native_midi_haiku.cpp 2012-01-15 23:01:05.000000000 +0100 >+++ SDL_mixer-1.2.12/native_midi/native_midi_haiku.cpp 2013-10-05 08:54:08.185935690 +0200 >@@ -71,7 +71,7 @@ class MidiEventsStore : public BMidi > { > if (!ev) { > if (fLoops && fEvs) { >- --fLoops; >+ if (fLoops > 0) --fLoops; > fPos = 0; > ev = fEvs; > } else >diff -dupr SDL_mixer-1.2.12-old/native_midi/native_midi_win32.c SDL_mixer-1.2.12/native_midi/native_midi_win32.c >--- SDL_mixer-1.2.12-old/native_midi/native_midi_win32.c 2012-01-15 23:01:05.000000000 +0100 >+++ SDL_mixer-1.2.12/native_midi/native_midi_win32.c 2013-10-05 08:55:57.154373541 +0200 >@@ -175,7 +175,8 @@ void CALLBACK MidiProc( HMIDIIN hMidi, U > case MOM_POSITIONCB: > if ((currentsong->MusicLoaded) && (dwParam1 == (DWORD_PTR)¤tsong->MidiStreamHdr[currentsong->CurrentHdr])) { > if (currentsong->Loops) { >- --currentsong->Loops; >+ if (currentsong->Loops > 0) >+ --currentsong->Loops; > currentsong->NewPos=0; > BlockOut(currentsong); > } else { >diff -dupr SDL_mixer-1.2.12-old/timidity/readmidi.c SDL_mixer-1.2.12/timidity/readmidi.c >--- SDL_mixer-1.2.12-old/timidity/readmidi.c 2012-01-15 23:01:05.000000000 +0100 >+++ SDL_mixer-1.2.12/timidity/readmidi.c 2014-05-28 17:07:06.200639436 +0200 >@@ -679,6 +679,8 @@ static MidiEvent *groom_list(int32 divis > compute_sample_increment(tempo, divisions); > skip_this_event=1; > } >+ else if (meep->event.channel >= MAXCHAN) >+ skip_this_event=1; > else if ((quietchannels & (1<<meep->event.channel))) > skip_this_event=1; > else switch (meep->event.type)
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 488200
:
360994
|
362524
|
380290
|
380292