00001 /* 00002 Copyright (C) 2002 Paul Davis 00003 00004 This program is free software; you can redistribute it and/or modify 00005 it under the terms of the GNU Lesser General Public License as published by 00006 the Free Software Foundation; either version 2.1 of the License, or 00007 (at your option) any later version. 00008 00009 This program is distributed in the hope that it will be useful, 00010 but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00012 GNU Lesser General Public License for more details. 00013 00014 You should have received a copy of the GNU Lesser General Public License 00015 along with this program; if not, write to the Free Software 00016 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 00017 00018 $Id: transport.h,v 1.6 2003/06/17 20:56:45 kaiv Exp $ 00019 */ 00020 00021 #ifndef __jack_transport_h__ 00022 #define __jack_transport_h__ 00023 00024 #ifdef __cplusplus 00025 extern "C" { 00026 #endif 00027 00028 #include <jack/types.h> 00029 00033 typedef enum { 00034 00035 JackTransportStopped, 00036 JackTransportRolling, 00037 JackTransportLooping 00038 00039 } jack_transport_state_t; 00040 00047 typedef enum { 00048 00049 JackTransportState = 0x1, 00050 JackTransportPosition = 0x2, 00051 JackTransportLoop = 0x4, 00052 JackTransportSMPTE = 0x8, 00053 JackTransportBBT = 0x10, 00054 00055 } jack_transport_bits_t; 00056 00057 #define EXTENDED_TIME_INFO \ 00058 00059 00062 typedef struct { 00063 00064 /* these two cannot be set from clients: the server sets them */ 00065 00066 jack_nframes_t frame_rate; 00067 jack_time_t usecs; 00069 jack_transport_bits_t valid; 00070 jack_transport_state_t transport_state; 00071 jack_nframes_t frame; 00072 jack_nframes_t loop_start; 00073 jack_nframes_t loop_end; 00074 00075 long smpte_offset; 00076 float smpte_frame_rate; 00078 int bar; 00079 int beat; 00080 int tick; 00081 double bar_start_tick; 00082 00083 float beats_per_bar; 00084 float beat_type; 00085 double ticks_per_beat; 00086 double beats_per_minute; 00087 00088 } jack_transport_info_t; 00089 00101 void jack_set_transport_info (jack_client_t *client, 00102 jack_transport_info_t *tinfo); 00103 00113 void jack_get_transport_info (jack_client_t *client, 00114 jack_transport_info_t *tinfo); 00115 00116 #ifdef __cplusplus 00117 } 00118 #endif 00119 00120 #endif /* __jack_transport_h__ */