Hello all,
I have written a small oscillator application in C++
Fiddling with errors and producing output to see where I am brougt me to a question:
I had only ``printf( "Processing ...\n" ); in my process callback.
My program started to produce output the moment when ``jack_activate( client );''
is called.
Isn't this a bit waste of CPU due to the fact that the process_audio callback copies
plenty of data to a port which is not used yet?
I'd expect to get output from this (nothing sounding yet) program at the moment when
it calls ``jack_connect''
for now I have this in my oscillator constructor:
... code snippet
...
make_wave();
jack_activate( client );
//FIXME: throw exception if an error with client activation
//FIXME: this should be placed elsewhwere and replaced by:
// jack_activate -> jack_connect for port connections
// jack_deactivate for port disconnections
// the process callback will be called for every activated client
// even no port is connected consuming unnecesary CPU power
}
...
Is this intended behavior? I'll leave the workaround in the comments in my code
snippet in place then.
I am using JACK 1.9.10 on a Linux x86_64 machine
# uname -a
Linux frankies 3.13.0-79-lowlatency #123-Ubuntu SMP PREEMPT
Cheers
Frank