mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2025-01-19 16:01:10 +00:00
Merge branch 'public-musicplus-core' into public-musicplus-lua
This commit is contained in:
commit
321cd5758a
4 changed files with 16 additions and 9 deletions
|
@ -185,7 +185,7 @@ static void P_ClearSingleMapHeaderInfo(INT16 i)
|
|||
mapheaderinfo[num]->musname[6] = 0;
|
||||
DEH_WriteUndoline("MUSICTRACK", va("%d", mapheaderinfo[num]->mustrack), UNDO_NONE);
|
||||
mapheaderinfo[num]->mustrack = 0;
|
||||
DEH_WriteUndoline("MUSICPOS", va("%d", mapheaderinfo[num]->mustrack), UNDO_NONE);
|
||||
DEH_WriteUndoline("MUSICPOS", va("%d", mapheaderinfo[num]->muspos), UNDO_NONE);
|
||||
mapheaderinfo[num]->muspos = 0;
|
||||
DEH_WriteUndoline("FORCECHARACTER", va("%d", mapheaderinfo[num]->forcecharacter), UNDO_NONE);
|
||||
mapheaderinfo[num]->forcecharacter[0] = '\0';
|
||||
|
|
|
@ -519,6 +519,10 @@ static void do_fading_callback()
|
|||
|
||||
static void count_music_bytes(int chan, void *stream, int len, void *udata)
|
||||
{
|
||||
(void)chan;
|
||||
(void)stream;
|
||||
(void)udata;
|
||||
|
||||
if (!music || I_SongType() == MU_GME || I_SongType() == MU_MOD || I_SongType() == MU_MID)
|
||||
return;
|
||||
music_bytes += len;
|
||||
|
@ -538,6 +542,8 @@ static void music_loop(void)
|
|||
|
||||
static UINT32 music_fade(UINT32 interval, void *param)
|
||||
{
|
||||
(void)param;
|
||||
|
||||
if (!is_fading ||
|
||||
internal_volume == fading_target ||
|
||||
fading_duration == 0)
|
||||
|
@ -885,6 +891,7 @@ boolean I_LoadSong(char *data, size_t len)
|
|||
)
|
||||
I_UnloadSong();
|
||||
|
||||
// always do this whether or not a music already exists
|
||||
var_cleanup();
|
||||
|
||||
#ifdef HAVE_LIBGME
|
||||
|
|
|
@ -1480,7 +1480,7 @@ void I_StopFadingSong(void)
|
|||
{
|
||||
}
|
||||
|
||||
boolean I_FadeSongFromVolume(UINT8 target_volume, UINT8 source_volume, UINT32 ms, void (*callback)(void));
|
||||
boolean I_FadeSongFromVolume(UINT8 target_volume, UINT8 source_volume, UINT32 ms, void (*callback)(void))
|
||||
{
|
||||
(void)target_volume;
|
||||
(void)source_volume;
|
||||
|
@ -1488,7 +1488,7 @@ boolean I_FadeSongFromVolume(UINT8 target_volume, UINT8 source_volume, UINT32 ms
|
|||
return false;
|
||||
}
|
||||
|
||||
boolean I_FadeSong(UINT8 target_volume, UINT32 ms, void (*callback)(void));
|
||||
boolean I_FadeSong(UINT8 target_volume, UINT32 ms, void (*callback)(void))
|
||||
{
|
||||
(void)target_volume;
|
||||
(void)ms;
|
||||
|
|
|
@ -812,10 +812,10 @@ void I_SetMusicVolume(UINT8 volume)
|
|||
|
||||
UINT32 I_GetSongLength()
|
||||
{
|
||||
if (midimode)
|
||||
if (I_SongType() == MU_MID)
|
||||
return 0;
|
||||
UINT32 length;
|
||||
e = FMOD_Sound_GetLength(music_stream, length, FMOD_TIMEUNIT_MS);
|
||||
FMR_MUSIC(FMOD_Sound_GetLength(music_stream, &length, FMOD_TIMEUNIT_MS));
|
||||
return length;
|
||||
}
|
||||
|
||||
|
@ -832,7 +832,7 @@ UINT32 I_GetSongLoopPoint(void)
|
|||
|
||||
boolean I_SetSongPosition(UINT32 position)
|
||||
{
|
||||
if(midimode)
|
||||
if(I_SongType() == MU_MID)
|
||||
// Dummy out; this works for some MIDI, but not others.
|
||||
// SDL does not support this for any MIDI.
|
||||
return false;
|
||||
|
@ -852,7 +852,7 @@ boolean I_SetSongPosition(UINT32 position)
|
|||
|
||||
UINT32 I_GetSongPosition(void)
|
||||
{
|
||||
if(midimode)
|
||||
if(I_SongType() == MU_MID)
|
||||
// Dummy out because unsupported, even though FMOD does this correctly.
|
||||
return 0;
|
||||
FMOD_RESULT e;
|
||||
|
@ -922,7 +922,7 @@ void I_StopFadingSong(void)
|
|||
{
|
||||
}
|
||||
|
||||
boolean I_FadeSongFromVolume(UINT8 target_volume, UINT8 source_volume, UINT32 ms, void (*callback)(void));
|
||||
boolean I_FadeSongFromVolume(UINT8 target_volume, UINT8 source_volume, UINT32 ms, void (*callback)(void))
|
||||
{
|
||||
(void)target_volume;
|
||||
(void)source_volume;
|
||||
|
@ -930,7 +930,7 @@ boolean I_FadeSongFromVolume(UINT8 target_volume, UINT8 source_volume, UINT32 ms
|
|||
return false;
|
||||
}
|
||||
|
||||
boolean I_FadeSong(UINT8 target_volume, UINT32 ms, void (*callback)(void));
|
||||
boolean I_FadeSong(UINT8 target_volume, UINT32 ms, void (*callback)(void))
|
||||
{
|
||||
(void)target_volume;
|
||||
(void)ms;
|
||||
|
|
Loading…
Reference in a new issue