diff --git a/src/lua_baselib.c b/src/lua_baselib.c index d6e268534..f62ba12aa 100644 --- a/src/lua_baselib.c +++ b/src/lua_baselib.c @@ -2236,8 +2236,6 @@ static int lib_sChangeMusic(lua_State *L) #endif music_flags = (UINT16)luaL_optinteger(L, 4, 0); - fadein_ms = luaL_optinteger(L, 5, 0); - if (!player || P_IsLocalPlayer(player)) { S_ChangeMusic(music_name, music_flags, looping); @@ -2314,12 +2312,6 @@ static int lib_sPauseMusic(lua_State *L) static int lib_sResumeMusic(lua_State *L) { - player_t *player = NULL; - NOHUD - if (!lua_isnone(L, 1) && lua_isuserdata(L, 1)) - { - player = *((player_t **)luaL_checkudata(L, 1, META_PLAYER)); - UINT32 position = (UINT32)luaL_checkinteger(L, 1); player_t *player = NULL; NOHUD if (!lua_isnone(L, 2) && lua_isuserdata(L, 2)) @@ -2351,7 +2343,7 @@ static int lib_sStopMusic(lua_State *L) if (!player || P_IsLocalPlayer(player)) { S_StopMusic(); - lua_pushboolean(L, true) + lua_pushboolean(L, true); } else lua_pushnil(L); diff --git a/src/sdl/mixer_sound.c b/src/sdl/mixer_sound.c index 6c4432f6b..2b3653fe7 100644 --- a/src/sdl/mixer_sound.c +++ b/src/sdl/mixer_sound.c @@ -457,7 +457,7 @@ static void music_loop(void) else { Mix_UnregisterEffect(MIX_CHANNEL_POST, count_music_bytes); - music_bytes = 0; + music_bytes = 0; // be consistent with FMOD, otherwise I'd prefer to freeze music_bytes // since the other flags indicate music is still playing. } @@ -508,7 +508,7 @@ void I_ResumeSong(INT32 handle) (void)handle; if(!midimode) { - while(Mix_UnregisterEffect(MIX_CHANNEL_POST, count_music_bytes) != 0) { } + while(Mix_UnregisterEffect(MIX_CHANNEL_POST, count_music_bytes) != 0) { } // HACK: fixes issue of multiple effect callbacks being registered if(music && !Mix_RegisterEffect(MIX_CHANNEL_POST, count_music_bytes, NULL, NULL)) // midimode and music must be checked in case nothing is actually playing @@ -528,16 +528,6 @@ boolean I_MusicPlaying(void) return (boolean)music; } -boolean I_MIDIPlaying(void) -{ - return midimode && music; -} - -boolean I_MusicPlaying(void) -{ - return (boolean)music; -} - boolean I_MusicPaused(void) { return Mix_PausedMusic(); @@ -918,7 +908,7 @@ boolean I_PlaySong(INT32 handle, boolean looping) is_looping = looping; //MIDI does count correctly, but dummy out because unsupported - //If this is enabled, you need to edit Mix_PlayMusic above to never loop (0) + //If this is enabled, you need to edit Mix_PlayMusic above to never loop (0) //and register the music_loop callback //music_bytes = 0; //if(!Mix_RegisterEffect(MIX_CHANNEL_POST, count_music_bytes, NULL, NULL))