def main(): pkaudio = Globals.getPKAudio() #pkaudio.start_server() pkaudio.connect_to_host(startserver=0) a = QApplication([]) w = SampleWidget() w.slotLoad('/home/ajole/wav/track.wav') w.show() a.setMainWidget(w) a.exec_loop()
#!/bin/env python """ Classes for reliable communication between application hosts. The Remote host class stores information about remote hosts locally, and is kept updated by the remote hosts via network events. TODO: - Change 'Dispatch' to something else. - move PKAudioServer to pkaudio.py, pkaudiocore.py """ from qt import * import socket import Globals import atexit pkaudio = Globals.getPKAudio() ENABLE_HOSTCACHE = True def _atexit(): if HostCacheServer in Singleton.instances: hcs = Singleton.instances[HostCacheServer] Singleton.instances[HostCacheServer] = None atexit.register(_atexit) class SingletonException(Exception): pass class Singleton: instances = {}