support more opus files
This commit is contained in:
parent
ac9e2d5323
commit
011af5689e
10
gameview.py
10
gameview.py
@ -1838,7 +1838,11 @@ class gui(QtGui.QWidget):
|
||||
|
||||
charid = int(self.m_chatmessage[CHAR_ID])
|
||||
self.blip = self.charlist[charid][2]
|
||||
|
||||
if exists(AOpath+"sounds/general/sfx-blip"+self.blip+".wav"):
|
||||
self.blipsnd = BASS_StreamCreateFile(False, AOpath+"sounds/general/sfx-blip"+self.blip+".wav", 0, 0, 0)
|
||||
elif exists(AOpath+"sounds/general/sfx-blip"+self.blip+".opus"):
|
||||
self.blipsnd = BASS_StreamCreateFile(False, AOpath+"sounds/general/sfx-blip"+self.blip+".opus", 0, 0, 0)
|
||||
BASS_ChannelSetAttribute(self.blipsnd, BASS_ATTRIB_VOL, self.blipslider.value() / 100.0)
|
||||
|
||||
self.text_state = 1
|
||||
@ -2035,11 +2039,17 @@ class gui(QtGui.QWidget):
|
||||
if BASS_ChannelIsActive(self.sound):
|
||||
BASS_ChannelStop(self.sound)
|
||||
BASS_StreamFree(self.sound)
|
||||
|
||||
if exists(AOpath + 'sounds/general/' + sfx + '.wav'):
|
||||
self.sound = BASS_StreamCreateFile(False, AOpath + 'sounds/general/' + sfx + '.wav', 0, 0, 0)
|
||||
BASS_ChannelSetAttribute(self.sound, BASS_ATTRIB_VOL, self.soundslider.value() / 100.0)
|
||||
BASS_ChannelPlay(self.sound, True)
|
||||
|
||||
elif exists(AOpath + 'sounds/general/' + sfx + '.opus'):
|
||||
self.sound = BASS_StreamCreateFile(False, AOpath + 'sounds/general/' + sfx + '.opus', 0, 0, 0)
|
||||
BASS_ChannelSetAttribute(self.sound, BASS_ATTRIB_VOL, self.soundslider.value() / 100.0)
|
||||
BASS_ChannelPlay(self.sound, True)
|
||||
|
||||
def playMusic(self, mus):
|
||||
if not mus.endswith(".mp3") and "===MUSIC START===.mp3" in self.musiclist: #vidya workaround
|
||||
mus += ".mp3"
|
||||
|
Loading…
Reference in New Issue
Block a user