/*
- Copyright (C) 2006 Paul Davis
+ Copyright (C) 2006 Paul Davis
Copyright (C) 2007 Mike Taht
This program is free software; you can redistribute it and/or modify
#include <usb.h>
#endif
-#include <glibmm/thread.h>
-#include <ardour/types.h>
+#include <glibmm/threads.h>
+#include "ardour/types.h"
-#include <control_protocol/control_protocol.h>
+#include "control_protocol/control_protocol.h"
class TranzportControlProtocol : public ARDOUR::ControlProtocol
{
const static int STATUS_OFFLINE = 0xff;
const static int STATUS_ONLINE = 0x01;
const static int STATUS_OK = 0x00;
-
+
const static int LIGHTS = 7;
const static int ROWS = 2;
const static int COLUMNS = 20;
ButtonPlay = 0x00100000,
ButtonRecord = 0x00000100,
ButtonShift = 0x08000000,
- ButtonFootswitch = 0x00001000
+ ButtonFootswitch = 0x00001000
};
enum WheelShiftMode {
WheelShiftMaster,
WheelShiftMarker
};
-
+
enum WheelMode {
WheelTimeline,
WheelScrub,
WheelIncrSecond,
WheelIncrMinute
};
-
+
enum DisplayMode {
DisplayNormal,
DisplayRecording,
BlingEnter,
BlingExit
};
-
+
pthread_t thread;
#if HAVE_TRANZPORT_KERNEL_DRIVER
int udev;
usb_dev_handle* udev;
#endif
-#if TRANZPORT_THREADS
- pthread_t thread_read;
-#endif
int last_read_error;
uint32_t buttonmask;
uint32_t timeout;
uint32_t inflight;
uint32_t current_track_id;
-#if TRANZPORT_THREADS
- pthread_t thread_write;
-#endif
int last_write_error;
uint8_t _datawheel;
uint8_t _device_status;
ARDOUR::gain_t gain_fraction;
- Glib::Mutex update_lock;
+ Glib::Threads::Mutex update_lock;
std::bitset<ROWS*COLUMNS> screen_invalid;
char screen_current[ROWS][COLUMNS];
std::bitset<LIGHTS> lights_flash;
int32_t last_notify;
- char last_notify_msg[COLUMNS+1];
+ char last_notify_msg[COLUMNS+1];
uint32_t last_bars;
uint32_t last_beats;
uint32_t last_ticks;
uint32_t last_mins;
uint32_t last_secs;
uint32_t last_frames;
- nframes_t last_where;
+ framepos_t last_where;
ARDOUR::gain_t last_track_gain;
uint32_t last_meter_fill;
struct timeval last_wheel_motion;
void screen_invalidate();
int screen_flush();
void screen_clear();
- // bool screen_isuptodate(); // think on this -
+ // bool screen_isuptodate(); // think on this -
int screen_show_bling();
- // Commands to write to the lcd
+ // Commands to write to the lcd
int lcd_init();
bool lcd_damage();
void enter_bling_mode();
void next_marker (); // basicui doesn't give me enough info
- void prev_marker ();
+ void prev_marker ();
void next_display_mode ();
void normal_update ();
void show_current_track ();
void show_track_gain ();
void show_transport_time ();
- void show_bbt (nframes_t where);
- void show_timecode (nframes_t where);
+ void show_bbt (framepos_t where);
+ void show_timecode (framepos_t where);
void show_wheel_mode ();
void show_gain ();
void show_pan ();