Re: [patch] voluntary-preempt-2.6.8.1-P1

Florian Schmidt
2004-08-16T12:57:46Z

[-- Attachment #1: Type: text/plain, Size: 1816 bytes --]

On Mon, 16 Aug 2004 07:17:10 -0400
Lee Revell <rlrevell@joe-job.com> wrote:

> > But it seems that this wasn't the only thing causing an xrun on
> > jackd client startup. I will try to take another look at the jackd
> > source..
> >
>
> Ingo mentioned that possibly the mlockall issue resulted from both
> processes mapping some of the same pages, which was ruled out by using
> small test programs, but maybe that is what is going on here. A jack
> client and server by definition have to map some of the same pages.
>
> Would it be worthwhile to compile the jack client -static?

Here's a minimal jack client which does _not_ produce an xrun on startup
for me (it doesn't really do anything either).. Maybe the xruns are the
other clients fault and not really determined by the jack mechanisms.. I
will extend it step by step to do something functional.. maybe i'll find
out what change introduces xruns. compile with

g++ jack_test.cc `pkg-config jack --libs` -o jack_test

jack_test.cc:
----------------------
#include <jack/jack.h>
#include <iostream>

jack_client_t *client;
jack_port_t *port;

int process(jack_nframes_t frames, void *arg) {
return 0;
}

int main(int argc, char *argv[]) {
std::cout << "client_new" << std::endl;
client = jack_client_new("foo");

std::cout << "port_register." << std::endl;
port = jack_port_register(client, "foobar",
JACK_DEFAULT_AUDIO_TYPE, JackPortIsOutput|JackPortIsTerminal, 0);

std::cout << "set_process_callback" << std::endl;
jack_set_process_callback(client, process, 0);

std::cout << "activate" << std::endl;
jack_activate(client);

std::cout << "running" << std::endl;
while(1) {sleep(1);};
}
-----------------------

--
Palimm Palimm!
http://affenbande.org/~tapas/

[-- Attachment #2: jack_test.cc --]
[-- Type: text/x-c++src, Size: 721 bytes --]

#include <jack/jack.h>
#include <iostream>

jack_client_t *client;
jack_port_t *port;

int process(jack_nframes_t frames, void *arg) {
return 0;
}

int main(int argc, char *argv[]) {
std::cout << "client_new" << std::endl;
client = jack_client_new("foo");

std::cout << "port_register." << std::endl;
port = jack_port_register(client, "foobar", JACK_DEFAULT_AUDIO_TYPE, JackPortIsOutput|JackPortIsTerminal, 0);

std::cout << "set_process_callback" << std::endl;
jack_set_process_callback(client, process, 0);

std::cout << "activate" << std::endl;
jack_activate(client);

std::cout << "running" << std::endl;
while(1) {sleep(1);};
}