From b0e4e8786b674b99c5e0f915d929702966973c15 Mon Sep 17 00:00:00 2001 From: Sattva Date: Sat, 10 Jun 2023 15:31:32 +0300 Subject: [PATCH] Media - ugly fix - Fix stop button not working - Fix previous track not stopping when new one played. - Note: I had to use Sound_GameSystem_RestartSoundSystem(), which triggers a client freeze, but it's the only way i could find, since there is no StopSound() api. I also do not undertsand what is a musicHandle local, and why it's always false? --- Leatrix_Plus.lua | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Leatrix_Plus.lua b/Leatrix_Plus.lua index f845e18..178f555 100644 --- a/Leatrix_Plus.lua +++ b/Leatrix_Plus.lua @@ -12388,6 +12388,7 @@ function LeaPlusLC:FriendCheck(name) stopBtn:Hide(); stopBtn:Show() LeaPlusLC:LockItem(stopBtn, true) stopBtn:SetScript("OnClick", function() + Sound_GameSystem_RestartSoundSystem() if musicHandle then StopSound(musicHandle) musicHandle = nil @@ -12410,7 +12411,9 @@ function LeaPlusLC:FriendCheck(name) -- Function to play a track and show the static highlight bar local function PlayTrack() -- Play tracks - if musicHandle then StopSound(musicHandle) end + -- if musicHandle then StopSound(musicHandle) end + Sound_GameSystem_RestartSoundSystem() + -- Sound_GameSystem_RestartSoundSystem() local file, soundID, trackTime if strfind(playlist[tracknumber], "#") then if strfind(playlist[tracknumber], ".mp3") then