diff --git a/ChangeLog b/ChangeLog index a5c3dd01..100833d7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -21,6 +21,10 @@ Romain Moret Jackdmp changes log --------------------------- +2008-06-137Stephane Letz + + * Driver class hierarchy simplification. + 2008-06-13 Stephane Letz * Correct JackPosixThread::ThreadHandler termination, do not set buffer size if same value is used. diff --git a/common/JackAudioDriver.cpp b/common/JackAudioDriver.cpp index 4f9a0c0c..e52c0064 100644 --- a/common/JackAudioDriver.cpp +++ b/common/JackAudioDriver.cpp @@ -279,11 +279,6 @@ int JackAudioDriver::ProcessSync() return 0; } -void JackAudioDriver::NotifyXRun(jack_time_t callback_usecs, float delayed_usecs) -{ - fEngine->NotifyXRun(callback_usecs, delayed_usecs); -} - jack_default_audio_sample_t* JackAudioDriver::GetInputBuffer(int port_index) { assert(fCapturePortList[port_index]); diff --git a/common/JackAudioDriver.h b/common/JackAudioDriver.h index 331f6120..45b99086 100644 --- a/common/JackAudioDriver.h +++ b/common/JackAudioDriver.h @@ -38,7 +38,7 @@ class EXPORT JackAudioDriver : public JackDriver int fCaptureChannels; int fPlaybackChannels; - // static tables since the actual number of ports may be changed by the real driver + // Static tables since the actual number of ports may be changed by the real driver // thus dynamic allocation is more difficult to handle jack_port_id_t fCapturePortList[DRIVER_PORT_NUM]; jack_port_id_t fPlaybackPortList[DRIVER_PORT_NUM]; @@ -60,9 +60,6 @@ class EXPORT JackAudioDriver : public JackDriver JackAudioDriver(const char* name, const char* alias, JackLockedEngine* engine, JackSynchro* table); virtual ~JackAudioDriver(); - virtual int Process(); - virtual int ProcessNull(); - virtual int Open(jack_nframes_t nframes, jack_nframes_t samplerate, int capturing, @@ -74,16 +71,18 @@ class EXPORT JackAudioDriver : public JackDriver const char* playback_driver_name, jack_nframes_t capture_latency, jack_nframes_t playback_latency); + + virtual int Process(); + virtual int ProcessNull(); virtual int Attach(); virtual int Detach(); + virtual int Write(); virtual int SetBufferSize(jack_nframes_t buffer_size); virtual int SetSampleRate(jack_nframes_t sample_rate); - virtual void NotifyXRun(jack_time_t callback_usecs, float delayed_usecs); // XRun notification sent by the driver - }; } // end of namespace diff --git a/common/JackDriver.cpp b/common/JackDriver.cpp index 597641d8..d516bd21 100644 --- a/common/JackDriver.cpp +++ b/common/JackDriver.cpp @@ -205,27 +205,27 @@ void JackDriver::NotifyXRun(jack_time_t cur_cycle_begin, float delayed_usecs) fEngine->NotifyXRun(cur_cycle_begin, delayed_usecs); } -void JackDriverClient::SetMaster(bool onoff) +void JackDriver::SetMaster(bool onoff) { fIsMaster = onoff; } -bool JackDriverClient::GetMaster() +bool JackDriver::GetMaster() { return fIsMaster; } -void JackDriverClient::AddSlave(JackDriverInterface* slave) +void JackDriver::AddSlave(JackDriverInterface* slave) { fSlaveList.push_back(slave); } -void JackDriverClient::RemoveSlave(JackDriverInterface* slave) +void JackDriver::RemoveSlave(JackDriverInterface* slave) { fSlaveList.remove(slave); } -int JackDriverClient::ProcessSlaves() +int JackDriver::ProcessSlaves() { int res = 0; list::const_iterator it; diff --git a/common/JackDriver.h b/common/JackDriver.h index 367530dc..381a9b79 100644 --- a/common/JackDriver.h +++ b/common/JackDriver.h @@ -50,7 +50,6 @@ class EXPORT JackDriverInterface {} virtual int Open() = 0; - virtual int Open(jack_nframes_t nframes, jack_nframes_t samplerate, bool capturing, @@ -71,6 +70,7 @@ class EXPORT JackDriverInterface virtual int Start() = 0; virtual int Stop() = 0; + virtual int SetBufferSize(jack_nframes_t buffer_size) = 0; virtual int SetSampleRate(jack_nframes_t sample_rate) = 0; @@ -85,6 +85,7 @@ class EXPORT JackDriverInterface virtual bool IsRealTime() const = 0; }; + /*! \brief The base interface for drivers clients. */ @@ -92,35 +93,11 @@ class EXPORT JackDriverInterface class EXPORT JackDriverClientInterface : public JackDriverInterface, public JackClientInterface {}; -/*! - \brief The base class for drivers clients. - */ - -class EXPORT JackDriverClient : public JackDriverClientInterface -{ - - private: - - std::list fSlaveList; - - protected: - - bool fIsMaster; - - public: - virtual bool Init() = 0; /* To be called by the wrapping thread Init method when the driver is a "blocking" one */ - virtual void SetMaster(bool onoff); - virtual bool GetMaster(); - virtual void AddSlave(JackDriverInterface* slave); - virtual void RemoveSlave(JackDriverInterface* slave); - virtual int ProcessSlaves(); -}; - /*! \brief The base class for drivers. */ -class EXPORT JackDriver : public JackDriverClient +class EXPORT JackDriver : public JackDriverClientInterface { protected: @@ -138,21 +115,29 @@ class EXPORT JackDriver : public JackDriverClient JackSynchro* fSynchroTable; JackEngineControl* fEngineControl; JackClientControl* fClientControl; - - JackClientControl* GetClientControl() const; + std::list fSlaveList; + bool fIsMaster; void CycleIncTime(); void CycleTakeBeginTime(); void CycleTakeEndTime(); - + + void SetupDriverSync(int ref, bool freewheel); + void NotifyXRun(jack_time_t callback_usecs, float delayed_usecs); // XRun notification sent by the driver + public: JackDriver(const char* name, const char* alias, JackLockedEngine* engine, JackSynchro* table); JackDriver(); virtual ~JackDriver(); + void SetMaster(bool onoff); + bool GetMaster(); + void AddSlave(JackDriverInterface* slave); + void RemoveSlave(JackDriverInterface* slave); + int ProcessSlaves(); + virtual int Open(); - virtual int Open(jack_nframes_t nframes, jack_nframes_t samplerate, bool capturing, @@ -164,11 +149,9 @@ class EXPORT JackDriver : public JackDriverClient const char* playback_driver_name, jack_nframes_t capture_latency, jack_nframes_t playback_latency); - virtual int Close(); virtual int Process(); - virtual int ProcessNull(); virtual int Attach(); @@ -182,17 +165,13 @@ class EXPORT JackDriver : public JackDriverClient virtual int SetBufferSize(jack_nframes_t buffer_size); virtual int SetSampleRate(jack_nframes_t sample_rate); - - void NotifyXRun(jack_time_t callback_usecs, float delayed_usecs); // XRun notification sent by the driver - - virtual bool IsRealTime() const; - int ClientNotify(int refnum, const char* name, int notify, int sync, int value1, int value2); + virtual int ClientNotify(int refnum, const char* name, int notify, int sync, int value1, int value2); + virtual JackClientControl* GetClientControl() const; - void SetupDriverSync(int ref, bool freewheel); - - virtual bool Init(); - + virtual bool IsRealTime() const; + virtual bool Init(); // To be called by the wrapping thread Init method when the driver is a "blocking" one + }; } // end of namespace diff --git a/common/JackRestartThreadedDriver.h b/common/JackRestartThreadedDriver.h index 2658258f..ea006ad8 100644 --- a/common/JackRestartThreadedDriver.h +++ b/common/JackRestartThreadedDriver.h @@ -30,7 +30,7 @@ class EXPORT JackRestartThreadedDriver : public JackThreadedDriver { public: - JackRestartThreadedDriver(JackDriverClient* driver) + JackRestartThreadedDriver(JackDriver* driver) :JackThreadedDriver(driver) {} virtual ~JackRestartThreadedDriver() diff --git a/common/JackThreadedDriver.cpp b/common/JackThreadedDriver.cpp index 7d30bad0..6f8fd55f 100644 --- a/common/JackThreadedDriver.cpp +++ b/common/JackThreadedDriver.cpp @@ -36,7 +36,7 @@ namespace Jack { -JackThreadedDriver::JackThreadedDriver(JackDriverClient* driver):fThread(this) +JackThreadedDriver::JackThreadedDriver(JackDriver* driver):fThread(this) { fDriver = driver; } diff --git a/common/JackThreadedDriver.h b/common/JackThreadedDriver.h index d67b0202..73c37c94 100644 --- a/common/JackThreadedDriver.h +++ b/common/JackThreadedDriver.h @@ -37,11 +37,11 @@ class EXPORT JackThreadedDriver : public JackDriverClientInterface, public JackR protected: JackThread fThread; - JackDriverClient* fDriver; - + JackDriver* fDriver; + public: - JackThreadedDriver(JackDriverClient* driver); + JackThreadedDriver(JackDriver* driver); virtual ~JackThreadedDriver(); virtual int Open(); @@ -56,7 +56,6 @@ class EXPORT JackThreadedDriver : public JackDriverClientInterface, public JackR const char* playback_driver_name, jack_nframes_t capture_latency, jack_nframes_t playback_latency); - virtual int Close(); virtual int Process(); @@ -75,15 +74,13 @@ class EXPORT JackThreadedDriver : public JackDriverClientInterface, public JackR virtual int SetSampleRate(jack_nframes_t sample_rate); virtual void SetMaster(bool onoff); - virtual bool GetMaster(); + virtual bool GetMaster(); virtual void AddSlave(JackDriverInterface* slave); virtual void RemoveSlave(JackDriverInterface* slave); virtual int ProcessSlaves(); - + virtual int ClientNotify(int refnum, const char* name, int notify, int sync, int value1, int value2); - virtual JackClientControl* GetClientControl() const; - virtual bool IsRealTime() const; // JackRunnableInterface interface diff --git a/common/JackWaitThreadedDriver.h b/common/JackWaitThreadedDriver.h index 2abf27a0..16b44f6a 100644 --- a/common/JackWaitThreadedDriver.h +++ b/common/JackWaitThreadedDriver.h @@ -34,11 +34,11 @@ class EXPORT JackWaitThreadedDriver : public JackThreadedDriver struct EXPORT JackDriverStarter : public JackRunnableInterface { - JackDriverClient* fDriver; + JackDriver* fDriver; JackThread fThread; bool fRunning; - JackDriverStarter(JackDriverClient* driver) + JackDriverStarter(JackDriver* driver) :fDriver(driver),fThread(this),fRunning(false) {} @@ -68,7 +68,7 @@ class EXPORT JackWaitThreadedDriver : public JackThreadedDriver public: - JackWaitThreadedDriver(JackDriverClient* netdriver) + JackWaitThreadedDriver(JackDriver* netdriver) :JackThreadedDriver(netdriver),fStarter(netdriver) {} virtual ~JackWaitThreadedDriver() diff --git a/common/transport_types.h b/common/transport_types.h index 5bcc9c32..41bfdfa3 100644 --- a/common/transport_types.h +++ b/common/transport_types.h @@ -29,225 +29,224 @@ extern "C" #include "types.h" - /** - * Transport states. - */ - typedef enum { - - /* the order matters for binary compatibility */ - JackTransportStopped = 0, /**< Transport halted */ - JackTransportRolling = 1, /**< Transport playing */ - JackTransportLooping = 2, /**< For OLD_TRANSPORT, now ignored */ - JackTransportStarting = 3, /**< Waiting for sync ready */ - //JackTransportSynching = 4 /**< temporary*/ - - } jack_transport_state_t; - - typedef uint64_t jack_unique_t; /**< Unique ID (opaque) */ - - /** - * Optional struct jack_position_t fields. - */ - typedef enum { - - JackPositionBBT = 0x10, /**< Bar, Beat, Tick */ - JackPositionTimecode = 0x20, /**< External timecode */ - JackBBTFrameOffset = 0x40, /**< Frame offset of BBT information */ - JackAudioVideoRatio = 0x80, /**< audio frames per video frame */ - JackVideoFrameOffset = 0x100 /**< frame offset of first video frame */ - } jack_position_bits_t; - - /** all valid position bits */ +/** + * Transport states. + */ +typedef enum { + + /* the order matters for binary compatibility */ + JackTransportStopped = 0, /**< Transport halted */ + JackTransportRolling = 1, /**< Transport playing */ + JackTransportLooping = 2, /**< For OLD_TRANSPORT, now ignored */ + JackTransportStarting = 3, /**< Waiting for sync ready */ + +} jack_transport_state_t; + +typedef uint64_t jack_unique_t; /**< Unique ID (opaque) */ + +/** + * Optional struct jack_position_t fields. + */ +typedef enum { + + JackPositionBBT = 0x10, /**< Bar, Beat, Tick */ + JackPositionTimecode = 0x20, /**< External timecode */ + JackBBTFrameOffset = 0x40, /**< Frame offset of BBT information */ + JackAudioVideoRatio = 0x80, /**< audio frames per video frame */ + JackVideoFrameOffset = 0x100 /**< frame offset of first video frame */ +} jack_position_bits_t; + +/** all valid position bits */ #define JACK_POSITION_MASK (JackPositionBBT|JackPositionTimecode) #define EXTENDED_TIME_INFO - typedef struct { - - /* these four cannot be set from clients: the server sets them */ - jack_unique_t unique_1; /**< unique ID */ - jack_time_t usecs; /**< monotonic, free-rolling */ - jack_nframes_t frame_rate; /**< current frame rate (per second) */ - jack_nframes_t frame; /**< frame number, always present */ - - jack_position_bits_t valid; /**< which other fields are valid */ - - /* JackPositionBBT fields: */ - int32_t bar; /**< current bar */ - int32_t beat; /**< current beat-within-bar */ - int32_t tick; /**< current tick-within-beat */ - double bar_start_tick; - - float beats_per_bar; /**< time signature "numerator" */ - float beat_type; /**< time signature "denominator" */ - double ticks_per_beat; - double beats_per_minute; - - /* JackPositionTimecode fields: (EXPERIMENTAL: could change) */ - double frame_time; /**< current time in seconds */ - double next_time; /**< next sequential frame_time - (unless repositioned) */ - - /* JackBBTFrameOffset fields: */ - jack_nframes_t bbt_offset; /**< frame offset for the BBT fields - (the given bar, beat, and tick - values actually refer to a time - frame_offset frames before the - start of the cycle), should - be assumed to be 0 if - JackBBTFrameOffset is not - set. If JackBBTFrameOffset is - set and this value is zero, the BBT - time refers to the first frame of this - cycle. If the value is positive, - the BBT time refers to a frame that - many frames before the start of the - cycle. */ - - /* JACK video positional data (experimental) */ - - float audio_frames_per_video_frame; /**< number of audio frames - per video frame. Should be assumed - zero if JackAudioVideoRatio is not - set. If JackAudioVideoRatio is set - and the value is zero, no video - data exists within the JACK graph */ - - jack_nframes_t video_offset; /**< audio frame at which the first video - frame in this cycle occurs. Should - be assumed to be 0 if JackVideoFrameOffset - is not set. If JackVideoFrameOffset is - set, but the value is zero, there is - no video frame within this cycle. */ - - /* For binary compatibility, new fields should be allocated from - * this padding area with new valid bits controlling access, so - * the existing structure size and offsets are preserved. */ - int32_t padding[7]; - - /* When (unique_1 == unique_2) the contents are consistent. */ - jack_unique_t unique_2; /**< unique ID */ - - } jack_position_t; - - - /** - * Prototype for the @a sync_callback defined by slow-sync clients. - * When the client is active, this callback is invoked just before - * process() in the same thread. This occurs once after registration, - * then subsequently whenever some client requests a new position, or - * the transport enters the ::JackTransportStarting state. This - * realtime function must not wait. - * - * The transport @a state will be: - * - * - ::JackTransportStopped when a new position is requested; - * - ::JackTransportStarting when the transport is waiting to start; - * - ::JackTransportRolling when the timeout has expired, and the - * position is now a moving target. - * - * @param state current transport state. - * @param pos new transport position. - * @param arg the argument supplied by jack_set_sync_callback(). - * - * @return TRUE (non-zero) when ready to roll. - */ - typedef int (*JackSyncCallback)(jack_transport_state_t state, - jack_position_t *pos, - void *arg); - - - /** - * Prototype for the @a timebase_callback used to provide extended - * position information. Its output affects all of the following - * process cycle. This realtime function must not wait. - * - * This function is called immediately after process() in the same - * thread whenever the transport is rolling, or when any client has - * requested a new position in the previous cycle. The first cycle - * after jack_set_timebase_callback() is also treated as a new - * position, or the first cycle after jack_activate() if the client - * had been inactive. - * - * The timebase master may not use its @a pos argument to set @a - * pos->frame. To change position, use jack_transport_reposition() or - * jack_transport_locate(). These functions are realtime-safe, the @a - * timebase_callback can call them directly. - * - * @param state current transport state. - * @param nframes number of frames in current period. - * @param pos address of the position structure for the next cycle; @a - * pos->frame will be its frame number. If @a new_pos is FALSE, this - * structure contains extended position information from the current - * cycle. If TRUE, it contains whatever was set by the requester. - * The @a timebase_callback's task is to update the extended - * information here. - * @param new_pos TRUE (non-zero) for a newly requested @a pos, or for - * the first cycle after the @a timebase_callback is defined. - * @param arg the argument supplied by jack_set_timebase_callback(). - */ - typedef void (*JackTimebaseCallback)(jack_transport_state_t state, - jack_nframes_t nframes, - jack_position_t *pos, - int new_pos, - void *arg); - - /********************************************************************* - * The following interfaces are DEPRECATED. They are only provided - * for compatibility with the earlier JACK transport implementation. - *********************************************************************/ - - /** - * Optional struct jack_transport_info_t fields. - * - * @see jack_position_bits_t. - */ - typedef enum { - - JackTransportState = 0x1, /**< Transport state */ - JackTransportPosition = 0x2, /**< Frame number */ - JackTransportLoop = 0x4, /**< Loop boundaries (ignored) */ - JackTransportSMPTE = 0x8, /**< SMPTE (ignored) */ - JackTransportBBT = 0x10 /**< Bar, Beat, Tick */ - - } jack_transport_bits_t; - - /** - * Deprecated struct for transport position information. - * - * @deprecated This is for compatibility with the earlier transport - * interface. Use the jack_position_t struct, instead. - */ - typedef struct { - - /* these two cannot be set from clients: the server sets them */ - - jack_nframes_t frame_rate; /**< current frame rate (per second) */ - jack_time_t usecs; /**< monotonic, free-rolling */ - - jack_transport_bits_t valid; /**< which fields are legal to read */ - jack_transport_state_t transport_state; - jack_nframes_t frame; - jack_nframes_t loop_start; - jack_nframes_t loop_end; - - long smpte_offset; /**< SMPTE offset (from frame 0) */ - float smpte_frame_rate; /**< 29.97, 30, 24 etc. */ - - int bar; - int beat; - int tick; - double bar_start_tick; - - float beats_per_bar; - float beat_type; - double ticks_per_beat; - double beats_per_minute; - - } - jack_transport_info_t; +typedef struct { + + /* these four cannot be set from clients: the server sets them */ + jack_unique_t unique_1; /**< unique ID */ + jack_time_t usecs; /**< monotonic, free-rolling */ + jack_nframes_t frame_rate; /**< current frame rate (per second) */ + jack_nframes_t frame; /**< frame number, always present */ + + jack_position_bits_t valid; /**< which other fields are valid */ + + /* JackPositionBBT fields: */ + int32_t bar; /**< current bar */ + int32_t beat; /**< current beat-within-bar */ + int32_t tick; /**< current tick-within-beat */ + double bar_start_tick; + + float beats_per_bar; /**< time signature "numerator" */ + float beat_type; /**< time signature "denominator" */ + double ticks_per_beat; + double beats_per_minute; + + /* JackPositionTimecode fields: (EXPERIMENTAL: could change) */ + double frame_time; /**< current time in seconds */ + double next_time; /**< next sequential frame_time + (unless repositioned) */ + + /* JackBBTFrameOffset fields: */ + jack_nframes_t bbt_offset; /**< frame offset for the BBT fields + (the given bar, beat, and tick + values actually refer to a time + frame_offset frames before the + start of the cycle), should + be assumed to be 0 if + JackBBTFrameOffset is not + set. If JackBBTFrameOffset is + set and this value is zero, the BBT + time refers to the first frame of this + cycle. If the value is positive, + the BBT time refers to a frame that + many frames before the start of the + cycle. */ + + /* JACK video positional data (experimental) */ + + float audio_frames_per_video_frame; /**< number of audio frames + per video frame. Should be assumed + zero if JackAudioVideoRatio is not + set. If JackAudioVideoRatio is set + and the value is zero, no video + data exists within the JACK graph */ + + jack_nframes_t video_offset; /**< audio frame at which the first video + frame in this cycle occurs. Should + be assumed to be 0 if JackVideoFrameOffset + is not set. If JackVideoFrameOffset is + set, but the value is zero, there is + no video frame within this cycle. */ + + /* For binary compatibility, new fields should be allocated from + * this padding area with new valid bits controlling access, so + * the existing structure size and offsets are preserved. */ + int32_t padding[7]; + + /* When (unique_1 == unique_2) the contents are consistent. */ + jack_unique_t unique_2; /**< unique ID */ + +} jack_position_t; + + +/** + * Prototype for the @a sync_callback defined by slow-sync clients. + * When the client is active, this callback is invoked just before + * process() in the same thread. This occurs once after registration, + * then subsequently whenever some client requests a new position, or + * the transport enters the ::JackTransportStarting state. This + * realtime function must not wait. + * + * The transport @a state will be: + * + * - ::JackTransportStopped when a new position is requested; + * - ::JackTransportStarting when the transport is waiting to start; + * - ::JackTransportRolling when the timeout has expired, and the + * position is now a moving target. + * + * @param state current transport state. + * @param pos new transport position. + * @param arg the argument supplied by jack_set_sync_callback(). + * + * @return TRUE (non-zero) when ready to roll. + */ +typedef int (*JackSyncCallback)(jack_transport_state_t state, + jack_position_t *pos, + void *arg); + + +/** + * Prototype for the @a timebase_callback used to provide extended + * position information. Its output affects all of the following + * process cycle. This realtime function must not wait. + * + * This function is called immediately after process() in the same + * thread whenever the transport is rolling, or when any client has + * requested a new position in the previous cycle. The first cycle + * after jack_set_timebase_callback() is also treated as a new + * position, or the first cycle after jack_activate() if the client + * had been inactive. + * + * The timebase master may not use its @a pos argument to set @a + * pos->frame. To change position, use jack_transport_reposition() or + * jack_transport_locate(). These functions are realtime-safe, the @a + * timebase_callback can call them directly. + * + * @param state current transport state. + * @param nframes number of frames in current period. + * @param pos address of the position structure for the next cycle; @a + * pos->frame will be its frame number. If @a new_pos is FALSE, this + * structure contains extended position information from the current + * cycle. If TRUE, it contains whatever was set by the requester. + * The @a timebase_callback's task is to update the extended + * information here. + * @param new_pos TRUE (non-zero) for a newly requested @a pos, or for + * the first cycle after the @a timebase_callback is defined. + * @param arg the argument supplied by jack_set_timebase_callback(). + */ +typedef void (*JackTimebaseCallback)(jack_transport_state_t state, + jack_nframes_t nframes, + jack_position_t *pos, + int new_pos, + void *arg); + +/********************************************************************* + * The following interfaces are DEPRECATED. They are only provided + * for compatibility with the earlier JACK transport implementation. + *********************************************************************/ + +/** + * Optional struct jack_transport_info_t fields. + * + * @see jack_position_bits_t. + */ +typedef enum { + + JackTransportState = 0x1, /**< Transport state */ + JackTransportPosition = 0x2, /**< Frame number */ + JackTransportLoop = 0x4, /**< Loop boundaries (ignored) */ + JackTransportSMPTE = 0x8, /**< SMPTE (ignored) */ + JackTransportBBT = 0x10 /**< Bar, Beat, Tick */ + +} jack_transport_bits_t; + +/** + * Deprecated struct for transport position information. + * + * @deprecated This is for compatibility with the earlier transport + * interface. Use the jack_position_t struct, instead. + */ +typedef struct { + + /* these two cannot be set from clients: the server sets them */ + + jack_nframes_t frame_rate; /**< current frame rate (per second) */ + jack_time_t usecs; /**< monotonic, free-rolling */ + + jack_transport_bits_t valid; /**< which fields are legal to read */ + jack_transport_state_t transport_state; + jack_nframes_t frame; + jack_nframes_t loop_start; + jack_nframes_t loop_end; + + long smpte_offset; /**< SMPTE offset (from frame 0) */ + float smpte_frame_rate; /**< 29.97, 30, 24 etc. */ + + int bar; + int beat; + int tick; + double bar_start_tick; + + float beats_per_bar; + float beat_type; + double ticks_per_beat; + double beats_per_minute; + +} +jack_transport_info_t; #ifdef __cplusplus } #endif -#endif /* __jack_transport_aux_h__ */ +#endif