static int _time_to_frames(ClientData clientData, Tcl_Interp *interp, int argc, Tcl_Obj* const *objv) { _t *dp = (_t *)clientData; if (argc != 3) return fw_error_str(interp, "jack-client time-to-frames time"); long time; if (Tcl_GetLongFromObj(interp, objv[2], &time) != TCL_OK) return TCL_ERROR; Tcl_SetObjResult(interp, Tcl_NewIntObj(jack_time_to_frames(dp->fw.client, (jack_time_t)time))); return TCL_OK; }
jack_nframes_t luajack_time_to_frames(luajack_t *client, jack_time_t usec) { cud_t *cud = get_cud(client); if(!cud) return 0; return jack_time_to_frames(cud->client, usec); }