[LAD] c/jack question

From: Egor Sanin <egor.sanin@email-addr-hidden>
Date: Sun Apr 08 2012 - 19:36:32 EEST

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
_______________________________________________
Linux-audio-dev mailing list
Linux-audio-dev@email-addr-hidden
http://lists.linuxaudio.org/listinfo/linux-audio-dev
Received on Sun Apr 8 20:15:03 2012

This archive was generated by hypermail 2.1.8 : Sun Apr 08 2012 - 20:15:03 EEST