/* been played out of the audio device, not including the buffer */ static int jack_get_output_time(void) { int return_val; /* don't try to get any values if the device is still closed */ if(JACK_GetState(driver) == CLOSED) return_val = 0; else return_val = JACK_GetPosition(driver, MILLISECONDS, PLAYED); /* get played position in terms of milliseconds */ TRACE("returning %d milliseconds\n", return_val); return return_val; }
CAMLprim value caml_bjack_get_position(value d, value pos_type, value type) { CAMLparam3(d,pos_type,type); CAMLreturn(Val_long(JACK_GetPosition(Bjack_drv_val(d),Int_val(pos_type),Int_val(type)))); }