Re: [LAD] Checking for jack xruns with Python

From: Bruno Gola <brunogola@email-addr-hidden>
Date: Mon Aug 27 2012 - 19:35:26 EEST

On Mon, Aug 27, 2012 at 1:25 PM, Robin Gareus <robin@email-addr-hidden> wrote:
> Hi Bruno,
>
> On 08/27/2012 05:51 PM, Bruno Gola wrote:
>> Hi :-)
>>
>> i'm writing a tool for monitoring Jack2 (actually the only thing I
>> need right now is to be able to check the XRuns).
>>
>> I'm using the jacklib.py
>> [https://raw.github.com/falkTX/Cadence/master/src/jacklib.py] and it
>> opens the client connection to jack ok. For example:
>>
>> ==================
>> import jacklib
>> client = jacklib.client_open("test-client", jacklib.JackNoStartServer, None)
>> xruns=0
>> def cb(*args):
>> global xruns
>> xruns += 1
>> return 0
>>
>> jacklib.set_xrun_callback(client, cb, None)
>>
>> while True:
>> raw_input("(%d) > " % xruns)
>> ==================
>>
>> This runs ok, but my callback (cb) is never called.
>>
>> I'm sure it's registered to receive XRun notifications because
>> whenever I call "jacklib.set_xrun_callback" it starts showing me some
>> jack debug messages like "Jack: JackClient::ClientNotify ref = 3 name
>> = test-client notify = 3" for each xrun.
>>
>> Am I missing anything?
>>
>> Thanks!
>
> You're missing a call to jack_activate() - or its python equivalent.

Thanks Robin, calling jacklib.jack_activate(client) made it! :-)

[]'s,

-- 
Bruno Gola <brunogola@email-addr-hidden>
http://bgo.la/ | +55 11 9294-5883
_______________________________________________
Linux-audio-dev mailing list
Linux-audio-dev@email-addr-hidden
http://lists.linuxaudio.org/listinfo/linux-audio-dev
Received on Mon Aug 27 20:15:03 2012

This archive was generated by hypermail 2.1.8 : Mon Aug 27 2012 - 20:15:03 EEST