Help with writing jack client

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Help with writing jack client

Gavin Band
Dear jackit-devel list,
first let me say thanks to the developers of jack for the wonderful
software.  I am looking for a bit of help getting my jack client
to run successfully (on a gentoo linux box, jackd 0.109.2.)

My jack client is a sound producer, i.e a playback client.  For the most
part it works fine, the problem being that it will occasionally start
producing corrupt sound, and never recover itself.  What's more when
this happens, all of the sound coming from the jack server (including
from other apps) also becomes corrupted,  and the only way to recover is
to restart jackd.

I wonder: does this indicate simply that my client is not managing to
produce its output to the server fast enough, or does it indicate that
it is doing something more serious wrong?  (If the former, I am sort of
surprised that it corrupts the whole jack server.  If the latter, are
there any guesses as to what might be going wrong?)

Thanks in advance for any suggestions,
Gavin Band.



-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Jackit-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jackit-devel
Reply | Threaded
Open this post in threaded view
|

Re: Help with writing jack client

Fons Adriaensen-2
On Sun, Feb 17, 2008 at 11:16:05AM +0000, Gavin Band wrote:

> Dear jackit-devel list,
> first let me say thanks to the developers of jack for the wonderful
> software.  I am looking for a bit of help getting my jack client
> to run successfully (on a gentoo linux box, jackd 0.109.2.)
>
> My jack client is a sound producer, i.e a playback client.  For the most
> part it works fine, the problem being that it will occasionally start
> producing corrupt sound, and never recover itself.  What's more when
> this happens, all of the sound coming from the jack server (including
> from other apps) also becomes corrupted,  and the only way to recover is
> to restart jackd.

Difficult to say with so little information.
 
- are there any error messages from jack ?

- what is the complete command line you use to start jack
  (i.e. all options)

- what are you doing in the process callback - calculations,
  reading a file, if so how, etc.

- is the process callback communicating with other parts
  of your app, and if so how ?
 
> I wonder: does this indicate simply that my client is not managing to
> produce its output to the server fast enough, or does it indicate that
> it is doing something more serious wrong?  (If the former, I am sort of
> surprised that it corrupts the whole jack server.  If the latter, are
> there any guesses as to what might be going wrong?)

If your app is too slow then some others may no even get the
chance to be fast enough. All processing for any cycle needs
to be finished before the next cycle is anbout to start.


--
FA

Laboratorio di Acustica ed Elettroacustica
Parma, Italia

Lascia la spina, cogli la rosa.


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Jackit-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jackit-devel
Reply | Threaded
Open this post in threaded view
|

Re: Help with writing jack client

Rui Nuno Capela
In reply to this post by Gavin Band
Gavin Band wrote:

> Dear jackit-devel list,
> first let me say thanks to the developers of jack for the wonderful
> software.  I am looking for a bit of help getting my jack client
> to run successfully (on a gentoo linux box, jackd 0.109.2.)
>
> My jack client is a sound producer, i.e a playback client.  For the most
> part it works fine, the problem being that it will occasionally start
> producing corrupt sound, and never recover itself.  What's more when
> this happens, all of the sound coming from the jack server (including
> from other apps) also becomes corrupted,  and the only way to recover is
> to restart jackd.
>
> I wonder: does this indicate simply that my client is not managing to
> produce its output to the server fast enough, or does it indicate that
> it is doing something more serious wrong?  (If the former, I am sort of
> surprised that it corrupts the whole jack server.  If the latter, are
> there any guesses as to what might be going wrong?)
>

show us the source code :) to me it sounds like you're not cleaning up
front the output port buffers that you get with jack_port_get_buffer()
in your process callback. for instance, are you accumulating on the
output buffer without zeroing it first? output ports buffers are dirty
you know ;)

but it could be something else

cheers
--
rncbc aka Rui Nuno Capela
[hidden email]

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Jackit-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jackit-devel