def myoverlay(self, status): registry_writer.write(r"SOFTWARE\\virtual audio player\\overlay", str(status.get())) if status.get() == True: self.mycreateoverlay() else: self.destroyoverlay()
def actual_rec(self, text): registry_writer.write( r"SOFTWARE\\virtual audio player\\actual rec device", text) registry_writer.write( r"SOFTWARE\\virtual audio player\\actual rec device id", str(self.recdevices[text])) global actual_rec_device, actual_rec_device_id, actualmiclisten actual_rec_device = text actual_rec_device_id = self.recdevices[text]
def playback(self, text): registry_writer.write( r"SOFTWARE\\virtual audio player\\playback device", text) registry_writer.write( r"SOFTWARE\\virtual audio player\\playback device id", str(self.playbackdevices[text])) global playback_device, playback_device_id, actualmiclisten playback_device = text playback_device_id = self.playbackdevices[text]
def rec_device(self, text): registry_writer.write(r"SOFTWARE\\virtual audio player\\rec device", text) registry_writer.write(r"SOFTWARE\\virtual audio player\\rec device id", str(self.recdevices[text])) global rec_device, rec_device_id, selflisten rec_device = text rec_device_id = self.recdevices[text] selflisten.running = False selflisten = listner.listen(rec_device_id, actual_playback_device_id) selflisten.start()
def pushtotalkkeychange(self, textvar): global pushtotalkkey, pushtotalk registry_writer.write( r"SOFTWARE\\virtual audio player\\push to talk key", str(textvar.get()).lower()) pushtotalkkey = str(textvar.get()).lower() self.pushtotalktext.set(str(textvar.get()).lower()) if len(pushtotalkkey) > 1 or len(pushtotalkkey) < 1: pushtotalk = False else: pushtotalk = True
def mysystemtray(self): registry_writer.write(r"SOFTWARE\\virtual audio player\\use systray", str(self.rootsystrayvar.get())) if self.rootsystrayvar.get() == True: if self.systraythread.is_alive() == False: self.systraythread = mysystray.mytray(self.windowvar, self.overlayvar) self.systraythread.start() else: self.systraythread.stop() while self.systraythread.is_alive(): sleep(0.1) self.systraythread.stop() self.main("main")
def set_toggle_button(self): global playervar if self.toggle_btn_text.get() == "pyaudio": self.toggle_btn_text.set("pygame") self.toggle_button_instance.configure( text=self.toggle_btn_text.get()) registry_writer.write(r"SOFTWARE\\virtual audio player\\player", "pygame") playervar = "pygame" else: self.toggle_btn_text.set("pyaudio") self.toggle_button_instance.configure( text=self.toggle_btn_text.get()) registry_writer.write(r"SOFTWARE\\virtual audio player\\player", "pyaudio") playervar = "pyaudio"
playback_device_id = registry_writer.read( r"SOFTWARE\\virtual audio player\\playback device id") rec_device_id = registry_writer.read( r"SOFTWARE\\virtual audio player\\rec device id") rec_device = registry_writer.read( r"SOFTWARE\\virtual audio player\\rec device") pushtotalkkey = registry_writer.read( r"SOFTWARE\\virtual audio player\\push to talk key") useovarlay = registry_writer.read( r"SOFTWARE\\virtual audio player\\overlay") systrayvar = registry_writer.read( r"SOFTWARE\\virtual audio player\\use systray") else: registry_writer.create(r"SOFTWARE\\virtual audio player\\player") firstrun = True registry_writer.write(r"SOFTWARE\\virtual audio player\\player", "pyaudio") registry_writer.write( r"SOFTWARE\\virtual audio player\\actual playback device id", "0") registry_writer.write( r"SOFTWARE\\virtual audio player\\actual playback device", "None") registry_writer.write(r"SOFTWARE\\virtual audio player\\playback device", "none") registry_writer.write( r"SOFTWARE\\virtual audio player\\playback device id", "0") registry_writer.write( r"SOFTWARE\\virtual audio player\\actual rec device id", "0") registry_writer.write(r"SOFTWARE\\virtual audio player\\actual rec device", "None") registry_writer.write(r"SOFTWARE\\virtual audio player\\rec device", "none") registry_writer.write(r"SOFTWARE\\virtual audio player\\rec device id",