From 62a614e435d5d037481ffdec242827ef8df1e2df Mon Sep 17 00:00:00 2001 From: cidoku Date: Mon, 9 Feb 2026 03:46:02 -0300 Subject: [PATCH] move music temporarily back to tcp thread, need to find a way to keep bass from locking up the gui thread --- gameview.py | 3 +-- packets.py | 2 ++ 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/gameview.py b/gameview.py index 708debd..ae1bf53 100644 --- a/gameview.py +++ b/gameview.py @@ -4295,8 +4295,8 @@ class GUI(QtGui.QWidget): elif ini.read_ini_bool("AO2XP.ini", "General", "download music", True): if musl.startswith("http"): - self.music = audio.loadURLHandle(mus, 0, BASS_SAMPLE_LOOP) print "[audio] Trying to play", mus + self.music = audio.loadURLHandle(mus, 0, BASS_SAMPLE_LOOP) else: global bucket mus = musl = bucket + 'base/sounds/music/' + musl.replace(" ", "%20") @@ -4819,7 +4819,6 @@ class GUI(QtGui.QWidget): self.ICLog.append(timestamp + '%s changed the music to %s' % (name, music)) else: self.ICLog.append(timestamp + 'The music was changed to %s' % music) - self.playMusic(music) def onModCallReceived(self, reason): if self.sndModCall: diff --git a/packets.py b/packets.py index b72d96d..bd97ded 100644 --- a/packets.py +++ b/packets.py @@ -120,6 +120,8 @@ def handlePackets(caller, total, record=True): charid = int(network[1]) showname = decodeAOString(network[2].decode("utf-8")) if len(network) > 2 else None caller.playMusicRequested.emit(music, charid, showname) + # TODO: TEMPORARY, TRYING TO FIND A WAY TO GET THIS OUT OF HERE WITHOUT FREEZING THE GUI THREAD + caller.parent.playMusic(music) elif header == 'BN': caller.newBackground.emit(network[1].lower(), True)