[linux-audio-dev] jack_process and pitch-shifting
S.W.Harris at ecs.soton.ac.uk
Fri Apr 22 16:33:53 EDT 2005
On Fri, Apr 22, 2005 at 06:23:51 +0200, Olivier Guilyardi wrote:
> Steve Harris wrote:
> >On Fri, Apr 22, 2005 at 05:13:47PM +0200, Olivier Guilyardi wrote:
> >>In Jackbeat, I want to include support for realtime pitch shifting.
> >>Can I do that in the jack process callback ? Or should I span a new
> >>thread and do the heavy job in there, ringbuffer'ing the result to the
> >>RT thread ?
> >Doing heavy jobs in the process() callback is fine, as long as the CPU
> >load is deterministic. I this case I think it should be.
> By deterministic do you mean that the CPU time consumed by a given
> process() should remain (quite) the same for each call ? Do you mean
> that Jack mesures it and adapt consequently ?
I mean that the CPU load should be the same from call to call, assuming
hte user hasn't changed any settings or whatever.
> Say the user starts a raw playback, and then choose to add
> pitch-shifting, while playing. The CPU load would suddenly increase. Is
> this bad ?
No, as long as it stays at that level. Problems come when for eg. the CPU
load is very high for a few cycles, then goes low for a bit, then high
again, without any configuration changes being made.
More information about the linux-audio-dev