Пример #1
0
int main(int argc, char *argv[])
{
	int rc;

	parse_arguments(argc, argv);

	/* become a JACK client */
    if ((client = jack_client_open(package, JackNullOption, NULL)) == 0) {
		fprintf(stderr, "JACK server not running?\n");
		exit(1);
	}

#ifndef WIN32
	signal(SIGQUIT, signal_handler);
	signal(SIGHUP, signal_handler);
#endif
	signal(SIGTERM, signal_handler);
	signal(SIGINT, signal_handler);

	jack_on_shutdown(client, jack_shutdown, 0);

	if (just_print_bufsize) {
		fprintf(stdout, "buffer size = %d  sample rate = %d\n", jack_get_buffer_size(client), jack_get_sample_rate(client));
		rc=0;
	}
	else
	{
		rc = jack_set_buffer_size(client, nframes);
		if (rc)
			fprintf(stderr, "jack_set_buffer_size(): %s\n", strerror(rc));
	}
	jack_client_close(client);

	return rc;
}
Пример #2
0
static PyObject* set_buffer_size(PyObject* self, PyObject* args)
{
    int size;

    if (! PyArg_ParseTuple(args, "i", &size))
        return NULL;

    pyjack_client_t * client = self_or_global_client(self);
    if(client->pjc == NULL) {
        PyErr_SetString(JackNotConnectedError, "Jack connection has not yet been established.");
        return NULL;
    }

    jack_nframes_t nsize = size;
    jack_set_buffer_size(client->pjc, nsize);

    return Py_None;
}
Пример #3
0
int	luajack_set_buffer_size(luajack_t *client, jack_nframes_t nframes) 
	{
	cud_t *cud = get_cud(client);	
	if(!cud) return 0;
	return jack_set_buffer_size(cud->client, nframes);
	}