def method_stop_audio_stream(self): self.slider.timer_stop() if self.bass_handle: if not pybass.BASS_ChannelStop(self.bass_handle): print 'BASS_ChannelStop error', pybass.get_error_description(pybass.BASS_ErrorGetCode()) else: self.method_set_position(0)
def sound_on_off(self): if self.play_sound: self.play_sound = False if self.bass_handle and self.sound_playing: self.sound_playing = False pybass.BASS_ChannelStop(self.bass_handle) else: self.play_sound = True self.sound_play() if self.menu_options: self.menu_options.setItemChecked(self.menu_sound, self.play_sound) self.config.set('play_sound', self.play_sound)
def sound_on_off(): global play_sound, sound_playing, bass_handle if play_sound: play_sound = False if bass_handle and sound_playing: sound_playing = False pybass.BASS_ChannelStop(bass_handle) else: play_sound = True sound_play() print('play_sound', play_sound) if menu_options: menu_options.setItemChecked(menu_sound, play_sound)
def stophandle(handle): """ Stop handle playback """ return dll.BASS_ChannelStop(handle)