Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 488200 | Differences between
and this patch

Collapse All | Expand All

(-)SDL_mixer-1.2.12-old/fluidsynth.c (-1 / +1 lines)
Lines 177-183 int fluidsynth_active(FluidSynthMidiSong Link Here
177
void fluidsynth_setvolume(FluidSynthMidiSong *song, int volume)
177
void fluidsynth_setvolume(FluidSynthMidiSong *song, int volume)
178
{
178
{
179
	/* FluidSynth's default is 0.2. Make 0.8 the maximum. */
179
	/* FluidSynth's default is 0.2. Make 0.8 the maximum. */
180
	fluidsynth.fluid_synth_set_gain(song->synth, (float) (volume * 0.00625));
180
	fluidsynth.fluid_synth_set_gain(song->synth, (float) (volume * 1.2 / MIX_MAX_VOLUME));
181
}
181
}
182
182
183
int fluidsynth_playsome(FluidSynthMidiSong *song, void *dest, int dest_len)
183
int fluidsynth_playsome(FluidSynthMidiSong *song, void *dest, int dest_len)
(-)SDL_mixer-1.2.12-old/mixer.c (-5 / +8 lines)
Lines 35-40 Link Here
35
#include "load_ogg.h"
35
#include "load_ogg.h"
36
#include "load_flac.h"
36
#include "load_flac.h"
37
#include "dynamic_flac.h"
37
#include "dynamic_flac.h"
38
#include "dynamic_fluidsynth.h"
38
#include "dynamic_mod.h"
39
#include "dynamic_mod.h"
39
#include "dynamic_mp3.h"
40
#include "dynamic_mp3.h"
40
#include "dynamic_ogg.h"
41
#include "dynamic_ogg.h"
Lines 126-132 const char *Mix_GetChunkDecoder(int inde Link Here
126
127
127
static void add_chunk_decoder(const char *decoder)
128
static void add_chunk_decoder(const char *decoder)
128
{
129
{
129
	void *ptr = SDL_realloc(chunk_decoders, (num_decoders + 1) * sizeof (const char **));
130
	void *ptr = SDL_realloc(chunk_decoders, (num_decoders + 1) * sizeof (const char *));
130
	if (ptr == NULL) {
131
	if (ptr == NULL) {
131
		return;  /* oh well, go on without it. */
132
		return;  /* oh well, go on without it. */
132
	}
133
	}
Lines 370-382 static void mix_channels(void *udata, Ui Link Here
370
					if (mix_input != mix_channel[i].chunk->abuf)
371
					if (mix_input != mix_channel[i].chunk->abuf)
371
						SDL_free(mix_input);
372
						SDL_free(mix_input);
372
373
373
					--mix_channel[i].looping;
374
					if (mix_channel[i].looping > 0)
375
					  --mix_channel[i].looping;
374
					mix_channel[i].samples = mix_channel[i].chunk->abuf + remaining;
376
					mix_channel[i].samples = mix_channel[i].chunk->abuf + remaining;
375
					mix_channel[i].playing = mix_channel[i].chunk->alen - remaining;
377
					mix_channel[i].playing = mix_channel[i].chunk->alen - remaining;
376
					index += remaining;
378
					index += remaining;
377
				}
379
				}
378
				if ( ! mix_channel[i].playing && mix_channel[i].looping ) {
380
				if ( ! mix_channel[i].playing && mix_channel[i].looping ) {
379
					--mix_channel[i].looping;
381
					if (mix_channel[i].looping > 0)
382
					  --mix_channel[i].looping;
380
					mix_channel[i].samples = mix_channel[i].chunk->abuf;
383
					mix_channel[i].samples = mix_channel[i].chunk->abuf;
381
					mix_channel[i].playing = mix_channel[i].chunk->alen;
384
					mix_channel[i].playing = mix_channel[i].chunk->alen;
382
				}
385
				}
Lines 1096-1109 int Mix_Playing(int which) Link Here
1096
1099
1097
		for ( i=0; i<num_channels; ++i ) {
1100
		for ( i=0; i<num_channels; ++i ) {
1098
			if ((mix_channel[i].playing > 0) ||
1101
			if ((mix_channel[i].playing > 0) ||
1099
				(mix_channel[i].looping > 0))
1102
				mix_channel[i].looping)
1100
			{
1103
			{
1101
				++status;
1104
				++status;
1102
			}
1105
			}
1103
		}
1106
		}
1104
	} else if ( which < num_channels ) {
1107
	} else if ( which < num_channels ) {
1105
		if ( (mix_channel[which].playing > 0) ||
1108
		if ( (mix_channel[which].playing > 0) ||
1106
		     (mix_channel[which].looping > 0) )
1109
		     mix_channel[which].looping )
1107
		{
1110
		{
1108
			++status;
1111
			++status;
1109
		}
1112
		}
(-)SDL_mixer-1.2.12-old/music.c (-2 / +7 lines)
Lines 163-169 const char *Mix_GetMusicDecoder(int inde Link Here
163
163
164
static void add_music_decoder(const char *decoder)
164
static void add_music_decoder(const char *decoder)
165
{
165
{
166
	void *ptr = SDL_realloc(music_decoders, (num_decoders + 1) * sizeof (const char **));
166
	void *ptr = SDL_realloc(music_decoders, (num_decoders + 1) * sizeof (const char *));
167
	if (ptr == NULL) {
167
	if (ptr == NULL) {
168
		return;  /* oh well, go on without it. */
168
		return;  /* oh well, go on without it. */
169
	}
169
	}
Lines 210-216 static int music_halt_or_loop (void) Link Here
210
		if (music_loops)
210
		if (music_loops)
211
		{
211
		{
212
			Mix_Fading current_fade;
212
			Mix_Fading current_fade;
213
			--music_loops;
213
			if (music_loops > 0)
214
			  --music_loops;
214
			current_fade = music_playing->fading;
215
			current_fade = music_playing->fading;
215
			music_internal_play(music_playing, 0.0);
216
			music_internal_play(music_playing, 0.0);
216
			music_playing->fading = current_fade;
217
			music_playing->fading = current_fade;
Lines 622-627 Mix_Music *Mix_LoadMUSType_RW(SDL_RWops Link Here
622
			int start = SDL_RWtell(rw);
623
			int start = SDL_RWtell(rw);
623
			if (SDL_RWread(rw, magic, 1, 4) != 4) {
624
			if (SDL_RWread(rw, magic, 1, 4) != 4) {
624
				Mix_SetError("Couldn't read from RWops");
625
				Mix_SetError("Couldn't read from RWops");
626
				SDL_free(music);
625
				return MUS_NONE;
627
				return MUS_NONE;
626
			}
628
			}
627
			SDL_RWseek(rw, start, RW_SEEK_SET);
629
			SDL_RWseek(rw, start, RW_SEEK_SET);
Lines 1283-1288 int Mix_HaltMusic(void) Link Here
1283
	SDL_LockAudio();
1285
	SDL_LockAudio();
1284
	if ( music_playing ) {
1286
	if ( music_playing ) {
1285
		music_internal_halt();
1287
		music_internal_halt();
1288
		if ( music_finished_hook ) {
1289
			music_finished_hook();
1290
		}
1286
	}
1291
	}
1287
	SDL_UnlockAudio();
1292
	SDL_UnlockAudio();
1288
1293
(-)SDL_mixer-1.2.12-old/music_ogg.c (-1 / +1 lines)
Lines 225-231 void OGG_delete(OGG_music *music) Link Here
225
void OGG_jump_to_time(OGG_music *music, double time)
225
void OGG_jump_to_time(OGG_music *music, double time)
226
{
226
{
227
#ifdef OGG_USE_TREMOR
227
#ifdef OGG_USE_TREMOR
228
       vorbis.ov_time_seek( &music->vf, (ogg_int64_t)time );
228
       vorbis.ov_time_seek( &music->vf, (ogg_int64_t)(time * 1000.0) );
229
#else
229
#else
230
       vorbis.ov_time_seek( &music->vf, time );
230
       vorbis.ov_time_seek( &music->vf, time );
231
#endif
231
#endif
(-)SDL_mixer-1.2.12-old/native_midi/native_midi_common.c (-1 / +1 lines)
Lines 230-236 static MIDIEvent *MIDItoStream(MIDIFile Link Here
230
		return NULL;
230
		return NULL;
231
        
231
        
232
    track = (MIDIEvent**) calloc(1, sizeof(MIDIEvent*) * mididata->nTracks);
232
    track = (MIDIEvent**) calloc(1, sizeof(MIDIEvent*) * mididata->nTracks);
233
	if (NULL == head)
233
	if (NULL == track)
234
        return NULL;
234
        return NULL;
235
	
235
	
236
	/* First, convert all tracks to MIDIEvent lists */
236
	/* First, convert all tracks to MIDIEvent lists */
(-)SDL_mixer-1.2.12-old/native_midi/native_midi_haiku.cpp (-1 / +1 lines)
Lines 71-77 class MidiEventsStore : public BMidi Link Here
71
    {
71
    {
72
      if (!ev) {
72
      if (!ev) {
73
        if (fLoops && fEvs) {
73
        if (fLoops && fEvs) {
74
          --fLoops;
74
          if (fLoops > 0) --fLoops;
75
          fPos = 0;
75
          fPos = 0;
76
          ev = fEvs;
76
          ev = fEvs;
77
        } else
77
        } else
(-)SDL_mixer-1.2.12-old/native_midi/native_midi_win32.c (-1 / +2 lines)
Lines 175-181 void CALLBACK MidiProc( HMIDIIN hMidi, U Link Here
175
    case MOM_POSITIONCB:
175
    case MOM_POSITIONCB:
176
      if ((currentsong->MusicLoaded) && (dwParam1 == (DWORD_PTR)&currentsong->MidiStreamHdr[currentsong->CurrentHdr])) {
176
      if ((currentsong->MusicLoaded) && (dwParam1 == (DWORD_PTR)&currentsong->MidiStreamHdr[currentsong->CurrentHdr])) {
177
        if (currentsong->Loops) {
177
        if (currentsong->Loops) {
178
          --currentsong->Loops;
178
          if (currentsong->Loops > 0)
179
            --currentsong->Loops;
179
          currentsong->NewPos=0;
180
          currentsong->NewPos=0;
180
          BlockOut(currentsong);
181
          BlockOut(currentsong);
181
        } else {
182
        } else {
(-)SDL_mixer-1.2.12-old/timidity/readmidi.c (+2 lines)
Lines 679-684 static MidiEvent *groom_list(int32 divis Link Here
679
	  compute_sample_increment(tempo, divisions);
679
	  compute_sample_increment(tempo, divisions);
680
	  skip_this_event=1;
680
	  skip_this_event=1;
681
	}
681
	}
682
      else if (meep->event.channel >= MAXCHAN)
683
	skip_this_event=1;
682
      else if ((quietchannels & (1<<meep->event.channel)))
684
      else if ((quietchannels & (1<<meep->event.channel)))
683
	skip_this_event=1;
685
	skip_this_event=1;
684
      else switch (meep->event.type)
686
      else switch (meep->event.type)
(-)SDL_mixer-1.2.12-old/wavestream (-1 lines)
Lines 324-330 Link Here
324
	/* Decode the audio data format */
324
	/* Decode the audio data format */
325
	format = (WaveFMT *)chunk.data;
325
	format = (WaveFMT *)chunk.data;
326
	if ( chunk.magic != FMT ) {
326
	if ( chunk.magic != FMT ) {
327
		SDL_free(chunk.data);
328
		Mix_SetError("Complex WAVE files not supported");
327
		Mix_SetError("Complex WAVE files not supported");
329
		was_error = 1;
328
		was_error = 1;
330
		goto done;
329
		goto done;

Return to bug 488200