1

I'm building a compas, which is a particular flamenco metronome. I want to direct the sound to Jack Audio. I'm using Python and PySide. So I'm using the PyJack library to process a wave file in jack:

def launchSoundThread(
    for sample in sampleWavs[sampleNumber]:
            try:
                compas_client.process(sample, input_samples)
            except jack.InputSyncError:
                print("InputSyncError")
            except jack.OutputSyncError:
                print("OutputSyncError")

My problem is, while processing the sound, the UI freezes. Threads don't help because of the Python Tiplock. So I'm trying to use multiprocessing and async functions:

pool = Pool(1)
r = pool.apply_async(launchSoundThread, args=() )

or

audio_process = Process( target=launchSoundThread, rgs=( ))
audio_process.start()

Neither of them work. They both get stuck while processing the audio and don't produce any sound.

Any suggestions? Many Thanks in advance Federico

n_malo
  • 11
  • 1
  • Can you use a method similar the one [described here](http://stackoverflow.com/a/16618842/2615940) to dump a traceback to a file and make sure there aren't any exceptions occurring in your subprocesses? The asynchronous multiprocessing methods won't necessarily dump exceptions to sterr or stdout for you to see. – skrrgwasme Aug 11 '14 at 20:00

0 Answers0