mirror of
https://github.com/Ardour/ardour.git
synced 2026-01-06 13:45:43 +01:00
3 different data wheel modes for tranzport, plus lock on writes, and more
git-svn-id: svn://localhost/trunk/ardour2@448 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
06764a3b07
commit
e9f9ca5278
7 changed files with 236 additions and 67 deletions
|
|
@ -4,7 +4,7 @@
|
|||
#include <vector>
|
||||
|
||||
#include <sys/time.h>
|
||||
|
||||
#include <pbd/lockmonitor.h>
|
||||
#include <pthread.h>
|
||||
#include <usb.h>
|
||||
#include <ardour/control_protocol.h>
|
||||
|
|
@ -66,12 +66,18 @@ class TranzportControlProtocol : public ControlProtocol {
|
|||
ButtonShift = 0x08000000
|
||||
};
|
||||
|
||||
enum WheelMode {
|
||||
WheelGain,
|
||||
WheelPan,
|
||||
WheelMaster
|
||||
enum WheelShiftMode {
|
||||
WheelShiftGain,
|
||||
WheelShiftPan,
|
||||
WheelShiftMaster
|
||||
};
|
||||
|
||||
enum WheelMode {
|
||||
WheelTimeline,
|
||||
WheelScrub,
|
||||
WheelShuttle
|
||||
};
|
||||
|
||||
pthread_t thread;
|
||||
uint32_t buttonmask;
|
||||
uint32_t timeout;
|
||||
|
|
@ -83,6 +89,7 @@ class TranzportControlProtocol : public ControlProtocol {
|
|||
char current_screen[2][20];
|
||||
bool lights[7];
|
||||
WheelMode wheel_mode;
|
||||
WheelShiftMode wheel_shift_mode;
|
||||
struct timeval last_wheel_motion;
|
||||
int last_wheel_dir;
|
||||
|
||||
|
|
@ -95,6 +102,8 @@ class TranzportControlProtocol : public ControlProtocol {
|
|||
uint32_t last_frames;
|
||||
jack_nframes_t last_where;
|
||||
|
||||
PBD::Lock write_lock;
|
||||
|
||||
int open ();
|
||||
int read (uint32_t timeout_override = 0);
|
||||
int write (uint8_t* cmd, uint32_t timeout_override = 0);
|
||||
|
|
@ -121,8 +130,12 @@ class TranzportControlProtocol : public ControlProtocol {
|
|||
void record_status_changed ();
|
||||
|
||||
void datawheel ();
|
||||
void scrub ();
|
||||
void scroll ();
|
||||
void shuttle ();
|
||||
|
||||
void next_wheel_mode ();
|
||||
void next_wheel_shift_mode ();
|
||||
|
||||
void next_track ();
|
||||
void prev_track ();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue