def speedTrigger(speed): global SESSION_DATA # This dictionary lists possible songs to play as well as times to skip to speedSongData = { "The Prodigy/Invaders Must Die.mp3": 49, "Edguy/Mandrake/05 - Wake Up The King.mp3": 93, "Killswitch Engage - Holy Diver": 144 } if (speed > 100) and SESSION_DATA['SPEED_SWITCH']: songNames = speedSongData.keys() songIndex = random.randint(0, len(songNames) - 1) songName = songNames[songIndex] pB_audio.playSong(songName) pB_audio.seek(speedSongData[songName]) WRITER.writeBusPacket('3F', '00', ['0C', '52', '01']) WRITER.writeBusPacket('3F', '00', ['0C', '41', '01']) WRITER.writeBusPacket('3F', '00', ['0C', '54', '01']) WRITER.writeBusPacket('3F', '00', ['0C', '44', '01'])
def speedTrigger(speed): global SESSION_DATA # This dictionary lists possible songs to play as well as times to skip to speedSongData = { "The Prodigy/Invaders Must Die.mp3": 49, "Edguy/Mandrake/05 - Wake Up The King.mp3": 93, "Killswitch Engage - Holy Diver": 144 } if (speed > 100) and SESSION_DATA['SPEED_SWITCH']: songNames = speedSongData.keys() songIndex = random.randint(0, len(songNames)-1) songName = songNames[songIndex] pB_audio.playSong(songName) pB_audio.seek(speedSongData[songName]) WRITER.writeBusPacket('3F','00', ['0C', '52', '01']) WRITER.writeBusPacket('3F','00', ['0C', '41', '01']) WRITER.writeBusPacket('3F','00', ['0C', '54', '01']) WRITER.writeBusPacket('3F','00', ['0C', '44', '01'])
def scanForward(): pB_audio.seek(10)
def scanBackward(): pB_audio.seek(-10)
def d_cdScanBackard(packet): cdSongHundreds, cdSong = _getTrackNumber() WRITER.writeBusPacket( '18', '68', ['39', '04', '09', '00', '3F', '00', cdSongHundreds, cdSong]) pB_audio.seek(-2)
def d_cdScanBackard(packet): cdSongHundreds, cdSong = _getTrackNumber() WRITER.writeBusPacket('18', '68', ['39', '04', '09', '00', '3F', '00', cdSongHundreds, cdSong]) pB_audio.seek(-2)