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 |
} |