[LAD] c/jack question

Egor Sanin egor.sanin at gmail.com
Sun Apr 8 16:36:32 UTC 2012


Pardon the newb question, but why does:

a) this work
---------------------------------------------
#include <jack/jack.h>

jack_position_t pos;
jack_transport_state_t state;
jack_nframes_t frame;

int process (jack_nframes_t nframes, void *arg) {
    state = jack_transport_query (client, &pos);
    frame = pos.frame;
}
---------------------------------------------

b) this segfaults
---------------------------------------------
#include <jack/jack.h>

jack_position_t *pos;
jack_transport_state_t state;
jack_nframes_t frame;

int process (jack_nframes_t nframes, void *arg) {
    state = jack_transport_query (client, pos);
    frame = pos->frame;
}

Thanks



More information about the Linux-audio-dev mailing list