Skip to content

Commit

Permalink
Force-stop old music
Browse files Browse the repository at this point in the history
  • Loading branch information
Hammie committed Apr 15, 2023
1 parent ae49798 commit f72e376
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions PROGRAM/sound/sound.c
Original file line number Diff line number Diff line change
Expand Up @@ -1309,7 +1309,7 @@ void SetMusic(string name)
//Trace("SetMusic : "+name);
if (oldMusicID)
{
SendMessage(Sound,"ll",MSG_SOUND_RELEASE, oldMusicID);
SendMessage(Sound,"lll",MSG_SOUND_STOP, oldMusicID, 0);
}

if (musicID)
Expand Down Expand Up @@ -1361,7 +1361,8 @@ void SetMusic(string name)

//TraceAndLog("MUSIC: scheme = " + name + ", name = " + music_name + ", (" + musicnumber + " of " + num + ")"); // LDH 13Feb09
}

// sl[llllfff]" file_name, type, simple_cache?, looped?, cached?, fade_in_time, start_x, start_y, start_y
// lsllllllfff
musicID = SendMessage(Sound,"lslllllll",MSG_SOUND_PLAY, music_name, SOUND_MP3_STEREO, VOLUME_MUSIC, true, true, false, MUSIC_CHANGE_TIME, silenceTime*1000);
if (musicID == 0) // LDH 24Mar09
{
Expand Down

0 comments on commit f72e376

Please sign in to comment.