summaryrefslogtreecommitdiff
path: root/libs/surfaces/tranzport
diff options
context:
space:
mode:
Diffstat (limited to 'libs/surfaces/tranzport')
-rw-r--r--libs/surfaces/tranzport/bling.cc10
-rw-r--r--libs/surfaces/tranzport/button_events.cc14
-rw-r--r--libs/surfaces/tranzport/button_yn.cc4
-rw-r--r--libs/surfaces/tranzport/buttons.cc16
-rw-r--r--libs/surfaces/tranzport/general.cc30
-rw-r--r--libs/surfaces/tranzport/init.cc60
-rw-r--r--libs/surfaces/tranzport/interface.cc4
-rw-r--r--libs/surfaces/tranzport/io.cc10
-rw-r--r--libs/surfaces/tranzport/io_kernel.cc26
-rw-r--r--libs/surfaces/tranzport/io_midi.cc6
-rw-r--r--libs/surfaces/tranzport/io_usb.cc26
-rw-r--r--libs/surfaces/tranzport/lcd.cc28
-rw-r--r--libs/surfaces/tranzport/lights.cc16
-rw-r--r--libs/surfaces/tranzport/meter.cc4
-rw-r--r--libs/surfaces/tranzport/mode.cc6
-rw-r--r--libs/surfaces/tranzport/mode_loop.cc4
-rw-r--r--libs/surfaces/tranzport/mode_tuner.cc4
-rw-r--r--libs/surfaces/tranzport/panner.cc4
-rw-r--r--libs/surfaces/tranzport/screen.cc24
-rw-r--r--libs/surfaces/tranzport/show.cc98
-rw-r--r--libs/surfaces/tranzport/slider_gain.h8
-rw-r--r--libs/surfaces/tranzport/state.cc16
-rw-r--r--libs/surfaces/tranzport/tranzport_base.h18
-rw-r--r--libs/surfaces/tranzport/tranzport_common.h12
-rw-r--r--libs/surfaces/tranzport/tranzport_control_protocol.h16
-rw-r--r--libs/surfaces/tranzport/view_automation.cc4
-rw-r--r--libs/surfaces/tranzport/view_bigmeter.cc4
-rw-r--r--libs/surfaces/tranzport/view_bling.cc4
-rw-r--r--libs/surfaces/tranzport/view_bus.cc4
-rw-r--r--libs/surfaces/tranzport/view_config.cc4
-rw-r--r--libs/surfaces/tranzport/view_layer.cc4
-rw-r--r--libs/surfaces/tranzport/view_loop.cc4
-rw-r--r--libs/surfaces/tranzport/view_manymeter.cc4
-rw-r--r--libs/surfaces/tranzport/view_marker.cc4
-rw-r--r--libs/surfaces/tranzport/view_master.cc4
-rw-r--r--libs/surfaces/tranzport/view_plugins.cc4
-rw-r--r--libs/surfaces/tranzport/view_std.cc4
-rw-r--r--libs/surfaces/tranzport/view_tempo.cc4
-rw-r--r--libs/surfaces/tranzport/view_tuner.cc4
-rw-r--r--libs/surfaces/tranzport/wheel.cc4
-rw-r--r--libs/surfaces/tranzport/wheel_modes.cc8
41 files changed, 266 insertions, 266 deletions
diff --git a/libs/surfaces/tranzport/bling.cc b/libs/surfaces/tranzport/bling.cc
index c60b699f3d..ea2ef56d42 100644
--- a/libs/surfaces/tranzport/bling.cc
+++ b/libs/surfaces/tranzport/bling.cc
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2006 Paul Davis
+ * Copyright (C) 2006 Paul Davis
* Copyright (C) 2007 Michael Taht
*
* This program is free software; you can redistribute it and/or modify
@@ -15,10 +15,10 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
+ *
* */
-/* The Bling class theoretically knows nothing about the device it's blinging
+/* The Bling class theoretically knows nothing about the device it's blinging
and depends on the overlying implementation to tell it about the format of the
device. Maybe this will become a template or people will inherit from it */
@@ -75,8 +75,8 @@ protected:
// make absolutely sure we have the pointer to the interface
// something like this
-#define BLING_INTFA(a) (intf)? 0:intf->a
-#define BLING_INTF(a) { if (intf) { intf->a; } else { return 0; } }
+#define BLING_INTFA(a) (intf)? 0:intf->a
+#define BLING_INTF(a) { if (intf) { intf->a; } else { return 0; } }
// Should any of these bother to return a status code?
diff --git a/libs/surfaces/tranzport/button_events.cc b/libs/surfaces/tranzport/button_events.cc
index 37c62a6ab7..1b070b3281 100644
--- a/libs/surfaces/tranzport/button_events.cc
+++ b/libs/surfaces/tranzport/button_events.cc
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2006 Paul Davis
+ * Copyright (C) 2006 Paul Davis
* Copyright (C) 2007 Michael Taht
*
* This program is free software; you can redistribute it and/or modify
@@ -15,7 +15,7 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
+ *
* */
#include <tranzport_common.h>
@@ -66,7 +66,7 @@ TranzportControlProtocol::button_event_trackleft_press (bool shifted)
{
prev_track ();
// not really the right layer for this
- if(display_mode == DisplayBigMeter) {
+ if(display_mode == DisplayBigMeter) {
if (route_table[0] != 0) {
notify(route_get_name (0).substr (0, 15).c_str());
}
@@ -81,9 +81,9 @@ TranzportControlProtocol::button_event_trackleft_release (bool shifted)
void
TranzportControlProtocol::button_event_trackright_press (bool shifted)
{
- next_track ();
+ next_track ();
// not really the right layer for this
- if(display_mode == DisplayBigMeter) {
+ if(display_mode == DisplayBigMeter) {
if (route_table[0] != 0) {
notify(route_get_name (0).substr (0, 15).c_str());
}
@@ -372,9 +372,9 @@ TranzportControlProtocol::button_event_footswitch_release (bool shifted)
void button_event_mute (bool pressed, bool shifted)
{
static int was_pressed = 0;
- if((!pressed && !was_pressed) || pressed) {
+ if((!pressed && !was_pressed) || pressed) {
was_pressed = 1;
- }
+ }
was_pressed = 0;
}
diff --git a/libs/surfaces/tranzport/button_yn.cc b/libs/surfaces/tranzport/button_yn.cc
index 04b6ab5668..56d6d379cf 100644
--- a/libs/surfaces/tranzport/button_yn.cc
+++ b/libs/surfaces/tranzport/button_yn.cc
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2006 Paul Davis
+ * Copyright (C) 2006 Paul Davis
* Copyright (C) 2007 Michael Taht
*
* This program is free software; you can redistribute it and/or modify
@@ -15,7 +15,7 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
+ *
* */
/* placeholder for button definitions for user edits like yes/no */
diff --git a/libs/surfaces/tranzport/buttons.cc b/libs/surfaces/tranzport/buttons.cc
index df5a88e6d9..99bcccc902 100644
--- a/libs/surfaces/tranzport/buttons.cc
+++ b/libs/surfaces/tranzport/buttons.cc
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2006 Paul Davis
+ * Copyright (C) 2006 Paul Davis
* Copyright (C) 2007 Michael Taht
*
* This program is free software; you can redistribute it and/or modify
@@ -15,7 +15,7 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
+ *
* */
#include "tranzport_control_protocol.h"
@@ -33,15 +33,15 @@ TranzportControlProtocol::process (uint8_t* buf)
_device_status = buf[1];
-#if DEBUG_TRANZPORT > 10
+#if DEBUG_TRANZPORT > 10
// Perhaps the device can go offline due to flow control, print command bits to see if we have anything interesting
if(_device_status == STATUS_ONLINE) {
- printf("ONLINE : %02x %02x %02x %02x %02x %02x %02x %02x\n",
- buf[0],buf[1],buf[2], buf[3], buf[4], buf[5],buf[6],buf[7]);
+ printf("ONLINE : %02x %02x %02x %02x %02x %02x %02x %02x\n",
+ buf[0],buf[1],buf[2], buf[3], buf[4], buf[5],buf[6],buf[7]);
}
if(_device_status == STATUS_OFFLINE) {
- printf("OFFLINE : %02x %02x %02x %02x %02x %02x %02x %02x\n",
- buf[0],buf[1],buf[2], buf[3], buf[4], buf[5],buf[6],buf[7]);
+ printf("OFFLINE : %02x %02x %02x %02x %02x %02x %02x %02x\n",
+ buf[0],buf[1],buf[2], buf[3], buf[4], buf[5],buf[6],buf[7]);
}
if(_device_status != STATUS_OK) { return 1; }
@@ -84,7 +84,7 @@ TranzportControlProtocol::process (uint8_t* buf)
// SHIFT + STOP + PLAY for bling mode?
// if (button_changes & ButtonPlay & ButtonStop) {
- // bling_mode_toggle();
+ // bling_mode_toggle();
// } or something like that
TRANZPORT_BUTTON_HANDLER(button_event_battery,ButtonBattery);
diff --git a/libs/surfaces/tranzport/general.cc b/libs/surfaces/tranzport/general.cc
index f8a548af6a..d051b36d1d 100644
--- a/libs/surfaces/tranzport/general.cc
+++ b/libs/surfaces/tranzport/general.cc
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2006 Paul Davis
+ * Copyright (C) 2006 Paul Davis
* Copyright (C) 2007 Michael Taht
*
* This program is free software; you can redistribute it and/or modify
@@ -15,7 +15,7 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
+ *
* */
#include <tranzport_common.h>
@@ -33,7 +33,7 @@ using namespace PBD;
#include <slider_gain.h>
// FIXME, flash recording light when recording and transport is moving
-int TranzportControlProtocol::lights_show_recording()
+int TranzportControlProtocol::lights_show_recording()
{
return lights_show_normal();
}
@@ -67,7 +67,7 @@ void TranzportControlProtocol::show_notify() {
// Need more bling!
-int TranzportControlProtocol::lights_show_bling()
+int TranzportControlProtocol::lights_show_bling()
{
switch (bling_mode) {
case BlingOff: break;
@@ -77,14 +77,14 @@ int TranzportControlProtocol::lights_show_bling()
case BlingRows: break; // light each row in sequence
case BlingFlashAll: break; // Flash everything randomly
case BlingEnter: lights_on(); // Show intro
- case BlingExit:
+ case BlingExit:
lights_off();
break;
}
return 0;
}
-int TranzportControlProtocol::screen_show_bling()
+int TranzportControlProtocol::screen_show_bling()
{
switch (bling_mode) {
case BlingOff: break;
@@ -97,20 +97,20 @@ int TranzportControlProtocol::screen_show_bling()
print(0,0,"!!Welcome to Ardour!");
print(1,0,"Peace through Music!");
break;
- case BlingExit:
+ case BlingExit:
break;
}
return 0;
}
-int TranzportControlProtocol::lights_show_normal()
+int TranzportControlProtocol::lights_show_normal()
{
/* Track only */
if (route_table[0]) {
boost::shared_ptr<AudioTrack> at = boost::dynamic_pointer_cast<AudioTrack> (route_table[0]);
lights_pending[LightTrackrec] = at && at->record_enabled();
- lights_pending[LightTrackmute] = route_get_muted(0);
+ lights_pending[LightTrackmute] = route_get_muted(0);
lights_pending[LightTracksolo] = route_get_soloed(0);
} else {
lights_pending[LightTrackrec] = false;
@@ -120,7 +120,7 @@ int TranzportControlProtocol::lights_show_normal()
/* Global settings */
- lights_pending[LightLoop] = session->get_play_loop();
+ lights_pending[LightLoop] = session->get_play_loop();
lights_pending[LightPunch] = session->config.get_punch_in() || session->config.get_punch_out();
lights_pending[LightRecord] = session->get_record_enabled();
lights_pending[LightAnysolo] = session->soloing();
@@ -128,9 +128,9 @@ int TranzportControlProtocol::lights_show_normal()
return 0;
}
-int TranzportControlProtocol::lights_show_tempo()
+int TranzportControlProtocol::lights_show_tempo()
{
- // someday soon fiddle with the lights more sanely based on the tempo
+ // someday soon fiddle with the lights more sanely based on the tempo
return lights_show_normal();
}
@@ -160,7 +160,7 @@ TranzportControlProtocol::update_state ()
case DisplayRecordingMeter:
lights_show_recording();
- show_meter();
+ show_meter();
break;
case DisplayBling:
@@ -190,7 +190,7 @@ TranzportControlProtocol::prev_marker ()
session->goto_start ();
notify("START");
}
-
+
}
void
@@ -327,7 +327,7 @@ TranzportControlProtocol::print_noretry (int row, int col, const char *text)
screen_invalid = mask;
}
-void TranzportControlProtocol::invalidate()
+void TranzportControlProtocol::invalidate()
{
lcd_damage(); lights_invalidate(); screen_invalidate(); // one of these days lcds can be fine but screens not
}
diff --git a/libs/surfaces/tranzport/init.cc b/libs/surfaces/tranzport/init.cc
index 289d4d79a7..3a01185407 100644
--- a/libs/surfaces/tranzport/init.cc
+++ b/libs/surfaces/tranzport/init.cc
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2006 Paul Davis
+ * Copyright (C) 2006 Paul Davis
* Copyright (C) 2007 Michael Taht
*
* This program is free software; you can redistribute it and/or modify
@@ -15,7 +15,7 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
+ *
*/
#include <tranzport_common.h>
@@ -41,26 +41,26 @@ TranzportControlProtocol::~TranzportControlProtocol ()
set_active (false);
}
-int TranzportControlProtocol::rtpriority_set(int priority)
+int TranzportControlProtocol::rtpriority_set(int priority)
{
struct sched_param rtparam;
int err;
char *a = (char*) alloca(4096*2); a[0] = 'a'; a[4096] = 'b';
memset (&rtparam, 0, sizeof (rtparam));
rtparam.sched_priority = priority; /* XXX should be relative to audio (JACK) thread */
- // Note - try SCHED_RR with a low limit
+ // Note - try SCHED_RR with a low limit
// - we don't care if we can't write everything this ms
// and it will help if we lose the device
if ((err = pthread_setschedparam (pthread_self(), SCHED_FIFO, &rtparam)) != 0) {
PBD::info << string_compose (_("%1: thread not running with realtime scheduling (%2)"), name(), strerror (errno)) << endmsg;
return 1;
- }
+ }
return 0;
}
// Running with realtime privs is bad when you have problems
-int TranzportControlProtocol::rtpriority_unset(int priority)
+int TranzportControlProtocol::rtpriority_unset(int priority)
{
struct sched_param rtparam;
int err;
@@ -69,7 +69,7 @@ int TranzportControlProtocol::rtpriority_unset(int priority)
if ((err = pthread_setschedparam (pthread_self(), SCHED_FIFO, &rtparam)) != 0) {
PBD::info << string_compose (_("%1: can't stop realtime scheduling (%2)"), name(), strerror (errno)) << endmsg;
return 1;
- }
+ }
PBD::info << string_compose (_("%1: realtime scheduling stopped (%2)"), name(), strerror (errno)) << endmsg;
return 0;
}
@@ -191,13 +191,13 @@ TranzportControlProtocol::monitor_work ()
/* bInterval for this beastie is 10ms */
if (_device_status == STATUS_OFFLINE) {
- first_time = true; offline++;
+ first_time = true; offline++;
#if TRANZPORT_DEBUG > 3
- if(offline == 1) {
+ if(offline == 1) {
cerr << "Transport has gone offline\n";
}
#endif
- } else {
+ } else {
offline = 0; // hate writing this
}
unsigned int s = (last_write_error == 0) | ((last_read_error == 0) << 1);
@@ -218,8 +218,8 @@ TranzportControlProtocol::monitor_work ()
#if DEBUG_TRANZPORT_BITS > 99
if (val != 8) {
printf("val = %d errno = %d\n",val,errno);
- buf[0] = buf[1] = buf[2] = buf[3] =
- buf[4] = buf[5] = buf[6] = buf[7] =
+ buf[0] = buf[1] = buf[2] = buf[3] =
+ buf[4] = buf[5] = buf[6] = buf[7] =
buf[8] = 0;
}
#endif
@@ -246,44 +246,44 @@ TranzportControlProtocol::monitor_work ()
#if DEBUG_TRANZPORT_BITS > 10
// Perhaps an online message indicates something
- if(_device_status != buf[1]) {
- printf("WTF- val: %d, device status != buf! %d != %d \n",val,_device_status,buf[1]); _device_status = buf[1];
+ if(_device_status != buf[1]) {
+ printf("WTF- val: %d, device status != buf! %d != %d \n",val,_device_status,buf[1]); _device_status = buf[1];
}
#endif
-
+
}
-
+
#if DEBUG_TRANZPORT_BITS > 10
if(val == 8) {
if(_device_status == STATUS_ONLINE) {
- printf("ONLINE : %02x %02x %02x %02x %02x %02x %02x %02x\n",
- buf[0],buf[1],buf[2], buf[3], buf[4], buf[5],buf[6],buf[7]);
+ printf("ONLINE : %02x %02x %02x %02x %02x %02x %02x %02x\n",
+ buf[0],buf[1],buf[2], buf[3], buf[4], buf[5],buf[6],buf[7]);
}
if(_device_status == STATUS_OFFLINE) {
- printf("OFFLINE : %02x %02x %02x %02x %02x %02x %02x %02x\n",
- buf[0],buf[1],buf[2], buf[3], buf[4], buf[5],buf[6],buf[7]);
+ printf("OFFLINE : %02x %02x %02x %02x %02x %02x %02x %02x\n",
+ buf[0],buf[1],buf[2], buf[3], buf[4], buf[5],buf[6],buf[7]);
}
if(_device_status == STATUS_OK) {
- printf("OK : %02x %02x %02x %02x %02x %02x %02x %02x\n",
- buf[0],buf[1],buf[2], buf[3], buf[4], buf[5],buf[6],buf[7]);
+ printf("OK : %02x %02x %02x %02x %02x %02x %02x %02x\n",
+ buf[0],buf[1],buf[2], buf[3], buf[4], buf[5],buf[6],buf[7]);
}
-
+
}
-
+
#endif
-
+
/* update whatever needs updating */
- if(last_write_error == 0 && (_device_status == STATUS_ONLINE || _device_status == STATUS_OK)) {
+ if(last_write_error == 0 && (_device_status == STATUS_ONLINE || _device_status == STATUS_OK)) {
update_state ();
-
+
/* still struggling with a good means of exerting flow control without having to create threads */
// pending = flush();
-
+
if(pending == 0) {
- pending = flush();
+ pending = flush();
} else {
if(inflight > 0) {
pending = --inflight; // we just did a whole bunch of writes so wait
@@ -293,7 +293,7 @@ TranzportControlProtocol::monitor_work ()
}
}
// pending = 0;
- }
+ }
return (void*) 0;
}
diff --git a/libs/surfaces/tranzport/interface.cc b/libs/surfaces/tranzport/interface.cc
index 3cf7090783..ac4341cde8 100644
--- a/libs/surfaces/tranzport/interface.cc
+++ b/libs/surfaces/tranzport/interface.cc
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2006 Paul Davis
+ * Copyright (C) 2006 Paul Davis
* Copyright (C) 2007 Michael Taht
*
* This program is free software; you can redistribute it and/or modify
@@ -15,7 +15,7 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
+ *
* */
#include "control_protocol/control_protocol.h"
diff --git a/libs/surfaces/tranzport/io.cc b/libs/surfaces/tranzport/io.cc
index 14242ea0ec..39be2c2e51 100644
--- a/libs/surfaces/tranzport/io.cc
+++ b/libs/surfaces/tranzport/io.cc
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2006 Paul Davis
+ * Copyright (C) 2006 Paul Davis
* Copyright (C) 2007 Michael Taht
*
* This program is free software; you can redistribute it and/or modify
@@ -15,7 +15,7 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
+ *
* */
/* The routines in here should know absolutely nothing about how io is actually done */
@@ -59,8 +59,8 @@ TranzportControlProtocol::lights_flush ()
std::bitset<LIGHTS> light_state;
light_state = lights_pending ^ lights_current;
if ( (light_state.none() || lights_invalid.none()))
- {
- return (0);
+ {
+ return (0);
}
#if DEBUG_TRANZPORT_LIGHTS
@@ -73,7 +73,7 @@ TranzportControlProtocol::lights_flush ()
if ( _device_status == STATUS_OK || _device_status == STATUS_ONLINE) {
for (i = 0; i<LIGHTS; i++) {
- if(light_state[i]) {
+ if(light_state[i]) {
if(light_set ((LightID)i,lights_pending[i])) {
#if DEBUG_TRANZPORT_LIGHTS > 2
printf("Did %d light writes\n",i);
diff --git a/libs/surfaces/tranzport/io_kernel.cc b/libs/surfaces/tranzport/io_kernel.cc
index 5e29e9ac7b..0532ee7e6b 100644
--- a/libs/surfaces/tranzport/io_kernel.cc
+++ b/libs/surfaces/tranzport/io_kernel.cc
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2006 Paul Davis
+ * Copyright (C) 2006 Paul Davis
* Copyright (C) 2007 Michael Taht
*
* This program is free software; you can redistribute it and/or modify
@@ -15,7 +15,7 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
+ *
* */
#if HAVE_TRANZPORT_KERNEL_DRIVER
@@ -33,8 +33,8 @@ TranzportControlProtocol::probe ()
{
if((udev = ::open(TRANZPORT_DEVICE,O_RDWR))> 0) {
::close(udev);
- return true;
- }
+ return true;
+ }
error << _("Tranzport: Can't open device for Read/Write: ") << endmsg;
return false;
}
@@ -44,7 +44,7 @@ TranzportControlProtocol::open ()
{
if((udev=::open(TRANZPORT_DEVICE,O_RDWR))> 0) {
return(udev);
- }
+ }
error << _("Tranzport: no device detected") << endmsg;
return udev;
}
@@ -67,22 +67,22 @@ TranzportControlProtocol::close ()
// someday do buffered reads, presently this does blocking reads, which is bad...
-int TranzportControlProtocol::read(uint8_t *buf, uint32_t timeout_override)
+int TranzportControlProtocol::read(uint8_t *buf, uint32_t timeout_override)
{
last_read_error = ::read (udev, (char *) buf, 8);
switch(errno) {
case -ENOENT:
case -ENXIO:
case -ECONNRESET:
- case -ESHUTDOWN:
- case -ENODEV:
+ case -ESHUTDOWN:
+ case -ENODEV:
cerr << "Tranzport disconnected, errno: " << last_read_error;
set_active(false);
break;
case -ETIMEDOUT: // This is not normal, but lets see what happened
cerr << "Tranzport read timed out, errno: " << last_read_error;
break;
- default:
+ default:
#if DEBUG_TRANZPORT
cerr << "Got an unknown error on read:" << last_read_error "\n";
#endif
@@ -90,7 +90,7 @@ int TranzportControlProtocol::read(uint8_t *buf, uint32_t timeout_override)
}
return last_read_error;
-}
+}
int
@@ -109,15 +109,15 @@ TranzportControlProtocol::write_noretry (uint8_t* cmd, uint32_t timeout_override
case -ENOENT:
case -ENXIO:
case -ECONNRESET:
- case -ESHUTDOWN:
- case -ENODEV:
+ case -ESHUTDOWN:
+ case -ENODEV:
cerr << "Tranzport disconnected, errno: " << last_write_error;
set_active(false);
break;
case -ETIMEDOUT: // This is not normal but
cerr << "Tranzport disconnected, errno: " << last_write_error;
break;
- default:
+ default:
#if DEBUG_TRANZPORT
cerr << "Got an unknown error on read:" << last_write_error "\n";
#endif
diff --git a/libs/surfaces/tranzport/io_midi.cc b/libs/surfaces/tranzport/io_midi.cc
index 0fd10cfbf3..b484ef79d5 100644
--- a/libs/surfaces/tranzport/io_midi.cc
+++ b/libs/surfaces/tranzport/io_midi.cc
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2006 Paul Davis
+ * Copyright (C) 2006 Paul Davis
* Copyright (C) 2007 Michael Taht
*
* This program is free software; you can redistribute it and/or modify
@@ -15,12 +15,12 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
+ *
* */
/* io_midi: Implements reading and writing tranzport events via the normal
tranzport midi specification */
-/* One day
+/* One day
#include <tranzport_control_protocol.h>
*/
diff --git a/libs/surfaces/tranzport/io_usb.cc b/libs/surfaces/tranzport/io_usb.cc
index c4a004a160..5d4e75f7d1 100644
--- a/libs/surfaces/tranzport/io_usb.cc
+++ b/libs/surfaces/tranzport/io_usb.cc
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2006 Paul Davis
+ * Copyright (C) 2006 Paul Davis
* Copyright (C) 2007 Michael Taht
*
* This program is free software; you can redistribute it and/or modify
@@ -15,7 +15,7 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
+ *
* */
#include <iostream>
@@ -40,7 +40,7 @@ using namespace PBD;
#include <pbd/abstract_ui.cc>
-// I note that these usb specific open, close, probe, read routines are basically
+// I note that these usb specific open, close, probe, read routines are basically
// pure boilerplate and could easily be abstracted elsewhere
bool
@@ -57,7 +57,7 @@ TranzportControlProtocol::probe ()
for(dev = bus->devices; dev; dev = dev->next) {
if (dev->descriptor.idVendor == VENDORID && dev->descriptor.idProduct == PRODUCTID) {
- return true;
+ return true;
}
}
}
@@ -97,7 +97,7 @@ TranzportControlProtocol::open_core (struct usb_device* dev)
cerr << _("Tranzport: cannot open USB transport") << endmsg;
return -1;
}
-
+
if (usb_claim_interface (udev, 0) < 0) {
cerr << _("Tranzport: cannot claim USB interface") << endmsg;
usb_close (udev);
@@ -135,20 +135,20 @@ TranzportControlProtocol::close ()
return ret;
}
-int TranzportControlProtocol::read(uint8_t *buf, uint32_t timeout_override)
+int TranzportControlProtocol::read(uint8_t *buf, uint32_t timeout_override)
{
last_read_error = usb_interrupt_read (udev, READ_ENDPOINT, (char *) buf, 8, timeout_override);
switch(last_read_error) {
case -ENOENT:
case -ENXIO:
case -ECONNRESET:
- case -ESHUTDOWN:
- case -ENODEV:
+ case -ESHUTDOWN:
+ case -ENODEV:
cerr << "Tranzport disconnected, errno: " << last_read_error;
set_active(false);
case -ETIMEDOUT: // This is normal
break;
- default:
+ default:
#if DEBUG_TRANZPORT
cerr << "Got an unknown error on read:" << last_read_error "\n";
#endif
@@ -156,7 +156,7 @@ int TranzportControlProtocol::read(uint8_t *buf, uint32_t timeout_override)
}
return last_read_error;
-}
+}
int
@@ -175,13 +175,13 @@ TranzportControlProtocol::write_noretry (uint8_t* cmd, uint32_t timeout_override
case -ENOENT:
case -ENXIO:
case -ECONNRESET:
- case -ESHUTDOWN:
- case -ENODEV:
+ case -ESHUTDOWN:
+ case -ENODEV:
cerr << "Tranzport disconnected, errno: " << last_write_error;
set_active(false);
case -ETIMEDOUT: // This is normal
break;
- default:
+ default:
#if DEBUG_TRANZPORT
cerr << "Got an unknown error on read:" << last_write_error "\n";
#endif
diff --git a/libs/surfaces/tranzport/lcd.cc b/libs/surfaces/tranzport/lcd.cc
index 88f9ea36d6..592bf7cf00 100644
--- a/libs/surfaces/tranzport/lcd.cc
+++ b/libs/surfaces/tranzport/lcd.cc
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2006 Paul Davis
+ * Copyright (C) 2006 Paul Davis
* Copyright (C) 2007 Michael Taht
*
* This program is free software; you can redistribute it and/or modify
@@ -15,14 +15,14 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
+ *
* */
#include <tranzport_control_protocol.h>
// doing these functions made me realize that screen_invalid should be lcd_isdamaged FIXME soon
-bool TranzportControlProtocol::lcd_damage()
+bool TranzportControlProtocol::lcd_damage()
{
screen_invalidate();
return true;
@@ -41,7 +41,7 @@ bool TranzportControlProtocol::lcd_damage (int row, int col, int length)
// Still working on the layering, arguably screen_invalid should be lcd_invalid
// or vice versa
-bool TranzportControlProtocol::lcd_isdamaged ()
+bool TranzportControlProtocol::lcd_isdamaged ()
{
if(screen_invalid.any()) {
#if DEBUG_TRANZPORT > 5
@@ -65,7 +65,7 @@ bool TranzportControlProtocol::lcd_isdamaged (int row, int col, int length)
#endif
return true;
}
- return false;
+ return false;
}
// lcd_clear would be a separate function for a smart display
@@ -84,32 +84,32 @@ TranzportControlProtocol::lcd_clear ()
int
TranzportControlProtocol::lcd_flush ()
{
- return 0;
+ return 0;
}
-int
+int
TranzportControlProtocol::lcd_write(uint8_t* cmd, uint32_t timeout_override)
{
int result;
#if (DEBUG_TRANZPORT_SCREEN > 0)
- printf("VALID : %s\n", (screen_invalid.to_string()).c_str());
+ printf("VALID : %s\n", (screen_invalid.to_string()).c_str());
#endif
if ((result = write(cmd,timeout_override))) {
#if DEBUG_TRANZPORT > 4
- printf("usb screen update failed for some reason... why? \nresult, cmd and data were %d %02x %02x %02x %02x %02x %02x %02x %02x\n",
- result, cmd[0],cmd[1],cmd[2], cmd[3], cmd[4], cmd[5],cmd[6],cmd[7]);
+ printf("usb screen update failed for some reason... why? \nresult, cmd and data were %d %02x %02x %02x %02x %02x %02x %02x %02x\n",
+ result, cmd[0],cmd[1],cmd[2], cmd[3], cmd[4], cmd[5],cmd[6],cmd[7]);
#endif
}
return result;
}
-void
-TranzportControlProtocol::lcd_fill (uint8_t fill_char)
+void
+TranzportControlProtocol::lcd_fill (uint8_t fill_char)
{
}
-void
-TranzportControlProtocol::lcd_print (int row, int col, const char* text)
+void
+TranzportControlProtocol::lcd_print (int row, int col, const char* text)
{
print(row,col,text);
}
diff --git a/libs/surfaces/tranzport/lights.cc b/libs/surfaces/tranzport/lights.cc
index c0e8092f45..89cf107ace 100644
--- a/libs/surfaces/tranzport/lights.cc
+++ b/libs/surfaces/tranzport/lights.cc
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2006 Paul Davis
+ * Copyright (C) 2006 Paul Davis
* Copyright (C) 2007 Michael Taht
*
* This program is free software; you can redistribute it and/or modify
@@ -15,7 +15,7 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
+ *
* */
#include <tranzport_control_protocol.h>
@@ -51,29 +51,29 @@ TranzportControlProtocol::light_off (LightID light)
void TranzportControlProtocol::lights_init()
{
lights_invalid.set();
- lights_flash = lights_pending = lights_current.reset();
+ lights_flash = lights_pending = lights_current.reset();
}
-// Now that all this is bitsets, I don't see much
+// Now that all this is bitsets, I don't see much
// need for these 4 to remain in the API
-void TranzportControlProtocol::light_validate (LightID light)
+void TranzportControlProtocol::light_validate (LightID light)
{
lights_invalid.reset(light);
}
-void TranzportControlProtocol::light_invalidate (LightID light)
+void TranzportControlProtocol::light_invalidate (LightID light)
{
lights_invalid.set(light);
}
-void TranzportControlProtocol::lights_validate ()
+void TranzportControlProtocol::lights_validate ()
{
lights_invalid.reset();
}
-void TranzportControlProtocol::lights_invalidate ()
+void TranzportControlProtocol::lights_invalidate ()
{
lights_invalid.set();
}
diff --git a/libs/surfaces/tranzport/meter.cc b/libs/surfaces/tranzport/meter.cc
index cc57846058..5adc387a40 100644
--- a/libs/surfaces/tranzport/meter.cc
+++ b/libs/surfaces/tranzport/meter.cc
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2006 Paul Davis
+ * Copyright (C) 2006 Paul Davis
* Copyright (C) 2007 Michael Taht
*
* This program is free software; you can redistribute it and/or modify
@@ -15,7 +15,7 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
+ *
* */
/* Generic support for character based metering on a track */
diff --git a/libs/surfaces/tranzport/mode.cc b/libs/surfaces/tranzport/mode.cc
index 03d715e66f..cc45c785ca 100644
--- a/libs/surfaces/tranzport/mode.cc
+++ b/libs/surfaces/tranzport/mode.cc
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2006 Paul Davis
+ * Copyright (C) 2006 Paul Davis
* Copyright (C) 2007 Michael Taht
*
* This program is free software; you can redistribute it and/or modify
@@ -15,7 +15,7 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
+ *
* */
#include <tranzport_control_protocol.h>
@@ -50,7 +50,7 @@ TranzportControlProtocol::next_display_mode ()
enter_big_meter_mode();
break;
- case DisplayConfig:
+ case DisplayConfig:
case DisplayBling:
case DisplayBlingMeter:
enter_normal_display_mode();
diff --git a/libs/surfaces/tranzport/mode_loop.cc b/libs/surfaces/tranzport/mode_loop.cc
index b9ea9f239e..527dd17c95 100644
--- a/libs/surfaces/tranzport/mode_loop.cc
+++ b/libs/surfaces/tranzport/mode_loop.cc
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2006 Paul Davis
+ * Copyright (C) 2006 Paul Davis
* Copyright (C) 2007 Michael Taht
*
* This program is free software; you can redistribute it and/or modify
@@ -15,7 +15,7 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
+ *
* */
/* placeholder for Marker Mode: Edit Markers, Setup Loops, and Punch in points */
diff --git a/libs/surfaces/tranzport/mode_tuner.cc b/libs/surfaces/tranzport/mode_tuner.cc
index a686f81be1..2d2a99adaf 100644
--- a/libs/surfaces/tranzport/mode_tuner.cc
+++ b/libs/surfaces/tranzport/mode_tuner.cc
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2006 Paul Davis
+ * Copyright (C) 2006 Paul Davis
* Copyright (C) 2007 Michael Taht
*
* This program is free software; you can redistribute it and/or modify
@@ -15,7 +15,7 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
+ *
* */
/* Placeholder for a tuner mode at some point */
diff --git a/libs/surfaces/tranzport/panner.cc b/libs/surfaces/tranzport/panner.cc
index 4a177db9a7..9fd064a3b1 100644
--- a/libs/surfaces/tranzport/panner.cc
+++ b/libs/surfaces/tranzport/panner.cc
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2006 Paul Davis
+ * Copyright (C) 2006 Paul Davis
* Copyright (C) 2007 Michael Taht
*
* This program is free software; you can redistribute it and/or modify
@@ -15,7 +15,7 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
+ *
*/
#include <tranzport_common.h>
diff --git a/libs/surfaces/tranzport/screen.cc b/libs/surfaces/tranzport/screen.cc
index 74d6c7d528..aa88817300 100644
--- a/libs/surfaces/tranzport/screen.cc
+++ b/libs/surfaces/tranzport/screen.cc
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2006 Paul Davis
+ * Copyright (C) 2006 Paul Davis
* Copyright (C) 2007 Michael Taht
*
* This program is free software; you can redistribute it and/or modify
@@ -15,7 +15,7 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
+ *
* */
#include <cstring>
@@ -26,7 +26,7 @@ void
TranzportControlProtocol::screen_clear ()
{
const char *blank = " ";
- print(0,0,blank);
+ print(0,0,blank);
print(1,0,blank);
}
@@ -51,7 +51,7 @@ void TranzportControlProtocol::screen_init ()
screen_invalidate();
}
-// FIXME: Switch to a column oriented flush to make the redraw of the
+// FIXME: Switch to a column oriented flush to make the redraw of the
// meters look better
int
@@ -72,20 +72,20 @@ TranzportControlProtocol::screen_flush ()
#endif
if(cell > 4) { row = 1; } else { row = 0; }
col_base = (cell*4)%COLUMNS;
-
- uint8_t cmd[8];
- cmd[0] = 0x00;
- cmd[1] = 0x01;
- cmd[2] = cell;
- cmd[3] = screen_pending[row][col_base];
+
+ uint8_t cmd[8];
+ cmd[0] = 0x00;
+ cmd[1] = 0x01;
+ cmd[2] = cell;
+ cmd[3] = screen_pending[row][col_base];
cmd[4] = screen_pending[row][col_base+1];
- cmd[5] = screen_pending[row][col_base+2];
+ cmd[5] = screen_pending[row][col_base+2];
cmd[6] = screen_pending[row][col_base+3];
cmd[7] = 0x00;
if((pending = lcd_write(cmd)) == 0) {
/* successful write: copy to current cached display */
- screen_invalid &= mask.flip();
+ screen_invalid &= mask.flip();
memcpy (&screen_current[row][col_base], &screen_pending[row][col_base], 4);
}
}
diff --git a/libs/surfaces/tranzport/show.cc b/libs/surfaces/tranzport/show.cc
index 46047f30c5..6d97abf43a 100644
--- a/libs/surfaces/tranzport/show.cc
+++ b/libs/surfaces/tranzport/show.cc
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2006 Paul Davis
+ * Copyright (C) 2006 Paul Davis
* Copyright (C) 2007 Michael Taht
*
* This program is free software; you can redistribute it and/or modify
@@ -15,7 +15,7 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
+ *
* */
#include <iostream>
@@ -70,7 +70,7 @@ log_meter (float db)
def = (db + 20.0f) * 2.5f + 50.0f;
}
- /* 115 is the deflection %age that would be
+ /* 115 is the deflection %age that would be
when db=6.0. this is an arbitrary
endpoint for our scaling.
*/
@@ -79,43 +79,43 @@ log_meter (float db)
}
#define TRANZ_U 0x1 /* upper */
-#define TRANZ_BL 0x2 /* lower left */
+#define TRANZ_BL 0x2 /* lower left */
#define TRANZ_Q2 0x3 /* 2 quadrant block */
-#define TRANZ_ULB 0x4 /* Upper + lower left */
-#define TRANZ_L 0x5 /* lower */
-#define TRANZ_UBL 0x6 /* upper left + bottom all */
-#define TRANZ_Q4 0x7 /* 4 quadrant block */
+#define TRANZ_ULB 0x4 /* Upper + lower left */
+#define TRANZ_L 0x5 /* lower */
+#define TRANZ_UBL 0x6 /* upper left + bottom all */
+#define TRANZ_Q4 0x7 /* 4 quadrant block */
#define TRANZ_UL 0x08 /* upper left */
// Shift Space - switches your "view"
// Currently defined views are:
// BigMeter
-//
+//
// Shift Record - SAVE SNAPSHOT
// Somewhere I was rewriting this
// Other meters
// Inverted - show meters "inside out" For example 4 meters covering 2 cells each, and the
-//
+//
// each 4 character cell could be an 8 bar meter = 10 meters!
// Dual Meter mode - master and current track
// We have 16 rows of pixels so we COULD do a vertical meter
-// BEAT BLOCKS - For each beat, flash a 8 block (could use the center for vertical meters)
+// BEAT BLOCKS - For each beat, flash a 8 block (could use the center for vertical meters)
// Could have something generic that could handle up to /20 time
// Odd times could flash the whole top bar for the first beat
-// Vertical Meter _ .colon - + ucolon A P R I H FULLBLACK
+// Vertical Meter _ .colon - + ucolon A P R I H FULLBLACK
// MV@$%&*()-
// 3 char block rotating beat `\'/
// 1 char rotating beat {/\}
// 4 char in block rotating beat {/\}
// {\/)
-
+
void TranzportControlProtocol::show_mini_meter()
{
// FIXME - show the current marker in passing
- const int meter_buf_size = 41;
+ const int meter_buf_size = 41;
static uint32_t last_meter_fill_l = 0;
static uint32_t last_meter_fill_r = 0;
uint32_t meter_size;
@@ -123,25 +123,25 @@ void TranzportControlProtocol::show_mini_meter()
float speed = fabsf(session->transport_speed());
char buf[meter_buf_size];
- if (speed == 1.0) {
- meter_size = 32;
+ if (speed == 1.0) {
+ meter_size = 32;
}
-
- if (speed == 0.0) {
+
+ if (speed == 0.0) {
meter_size = 20; // not actually reached
}
-
- if (speed > 0.0 && (speed < 1.0)) {
+
+ if (speed > 0.0 && (speed < 1.0)) {
meter_size = 20; // may shrink more one day
}
- if (speed > 1.0 && (speed < 2.0)) {
+ if (speed > 1.0 && (speed < 2.0)) {
meter_size = 20;
}
-
+
if (speed >= 2.0) {
- meter_size = 24;
- }
+ meter_size = 24;
+ }
// you only seem to get a route_table[0] == 0 on moving forward - bug in next_track?
@@ -180,19 +180,19 @@ void TranzportControlProtocol::show_mini_meter()
light_on (LightTrackrec);
}
- const uint8_t char_map[16] = { ' ', TRANZ_UL,
+ const uint8_t char_map[16] = { ' ', TRANZ_UL,
TRANZ_U, TRANZ_U,
- TRANZ_BL, TRANZ_Q2,
+ TRANZ_BL, TRANZ_Q2,
TRANZ_Q2, TRANZ_ULB,
- TRANZ_L, TRANZ_UBL,
+ TRANZ_L, TRANZ_UBL,
' ',' ',
TRANZ_L, TRANZ_UBL,
TRANZ_Q4,TRANZ_Q4
- };
+ };
unsigned int val,j,i;
for(j = 1, i = 0; i < meter_size/2; i++, j+=2) {
- val = (fill_left >= j) | ((fill_left >= j+1) << 1) |
+ val = (fill_left >= j) | ((fill_left >= j+1) << 1) |
((fill_right >=j) << 2) | ((fill_right >= j+1) << 3);
buf[i] = char_map[val];
}
@@ -207,7 +207,7 @@ void TranzportControlProtocol::show_mini_meter()
// char peak[2]; peak[0] = ' '; peak[1] = '\0';
// if(fraction_l == 1.0 || fraction_r == 1.0) peak[0] = 'P';
- // print (1,8,peak); // Put a peak meter - P in if we peaked.
+ // print (1,8,peak); // Put a peak meter - P in if we peaked.
}
@@ -218,7 +218,7 @@ TranzportControlProtocol::show_meter ()
if (route_table[0] == 0) {
// Principle of least surprise
print (0, 0, "No audio to meter!!!");
- print (1, 0, "Select another track");
+ print (1, 0, "Select another track");
return;
}
@@ -260,7 +260,7 @@ TranzportControlProtocol::show_meter ()
for (i = 0; i < fill; ++i) {
buf[i] = 0x07; /* tranzport special code for 4 quadrant LCD block */
- }
+ }
/* add a possible half-step */
@@ -285,7 +285,7 @@ TranzportControlProtocol::show_meter ()
void
TranzportControlProtocol::show_bbt (framepos_t where)
-{
+{
if (where != last_where) {
char buf[16];
Timecode::BBT_Time bbt;
@@ -303,33 +303,33 @@ TranzportControlProtocol::show_bbt (framepos_t where)
float speed = fabsf(session->transport_speed());
- if (speed == 1.0) {
+ if (speed == 1.0) {
sprintf (buf, "%03" PRIu32 "%1" PRIu32, bbt.bars,bbt.beats); // switch to hex one day
- print (1, 16, buf);
+ print (1, 16, buf);
}
- if (speed == 0.0) {
+ if (speed == 0.0) {
sprintf (buf, "%03" PRIu32 "|%1" PRIu32 "|%04" PRIu32, bbt.bars,bbt.beats,bbt.ticks);
- print (1, 10, buf);
+ print (1, 10, buf);
}
- if (speed > 0.0 && (speed < 1.0)) {
+ if (speed > 0.0 && (speed < 1.0)) {
sprintf (buf, "%03" PRIu32 "|%1" PRIu32 "|%04" PRIu32, bbt.bars,bbt.beats,bbt.ticks);
- print (1, 10, buf);
+ print (1, 10, buf);
}
- if (speed > 1.0 && (speed < 2.0)) {
+ if (speed > 1.0 && (speed < 2.0)) {
sprintf (buf, "%03" PRIu32 "|%1" PRIu32 "|%04" PRIu32, bbt.bars,bbt.beats,bbt.ticks);
- print (1, 10, buf);
+ print (1, 10, buf);
}
if (speed >= 2.0) {
- sprintf (buf, "%03" PRIu32 "|%1" PRIu32 "|%02" PRIu32, bbt.bars,bbt.beats,bbt.ticks);
- print (1, 12, buf);
- }
+ sprintf (buf, "%03" PRIu32 "|%1" PRIu32 "|%02" PRIu32, bbt.bars,bbt.beats,bbt.ticks);
+ print (1, 12, buf);
+ }
TempoMap::Metric m (session->tempo_map().metric_at (where));
-
+
// the lights stop working well at above 100 bpm so don't bother
if(m.tempo().beats_per_minute() < 101.0 && (speed > 0.0)) {
@@ -375,7 +375,7 @@ TranzportControlProtocol::show_timecode (framepos_t where)
print (1, 15, buf);
sprintf (buf, "%02" PRIu32, timecode.frames);
- print_noretry (1, 18, buf);
+ print_noretry (1, 18, buf);
last_where = where;
}
@@ -388,12 +388,12 @@ TranzportControlProtocol::show_track_gain ()
if (route_table[0]) {
gain_t g = route_get_gain (0);
if ((g != last_track_gain) || lcd_isdamaged(0,12,8)) {
- char buf[16];
+ char buf[16];
snprintf (buf, sizeof (buf), "%6.1fdB", coefficient_to_dB (route_get_effective_gain (0)));
- print (0, 12, buf);
+ print (0, 12, buf);
last_track_gain = g;
}
} else {
- print (0, 9, " ");
+ print (0, 9, " ");
}
}
diff --git a/libs/surfaces/tranzport/slider_gain.h b/libs/surfaces/tranzport/slider_gain.h
index 1bb497178f..c85930001d 100644
--- a/libs/surfaces/tranzport/slider_gain.h
+++ b/libs/surfaces/tranzport/slider_gain.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2006 Paul Davis
+ * Copyright (C) 2006 Paul Davis
* Copyright (C) 2007 Michael Taht
*
* This program is free software; you can redistribute it and/or modify
@@ -15,13 +15,13 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
+ *
* */
#ifndef ardour_slider_gain
#define ardour_slider_gain
-static inline double
+static inline double
gain_to_slider_position (ARDOUR::gain_t g)
{
if (g == 0) return 0;
@@ -29,7 +29,7 @@ gain_to_slider_position (ARDOUR::gain_t g)
}
-static inline ARDOUR::gain_t
+static inline ARDOUR::gain_t
slider_position_to_gain (double pos)
{
/* XXX Marcus writes: this doesn't seem right to me. but i don't have a better answer ... */
diff --git a/libs/surfaces/tranzport/state.cc b/libs/surfaces/tranzport/state.cc
index 119e7953d2..f5718174be 100644
--- a/libs/surfaces/tranzport/state.cc
+++ b/libs/surfaces/tranzport/state.cc
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2006 Paul Davis
+ * Copyright (C) 2006 Paul Davis
* Copyright (C) 2007 Michael Taht
*
* This program is free software; you can redistribute it and/or modify
@@ -15,7 +15,7 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
+ *
*/
#include <iostream>
@@ -48,7 +48,7 @@ using namespace PBD;
// FIXME: How to handle multiple tranzports in a system?
XMLNode&
-TranzportControlProtocol::get_state ()
+TranzportControlProtocol::get_state ()
{
return ControlProtocol::get_state();
}
@@ -108,7 +108,7 @@ TranzportControlProtocol::set_state (const XMLNode& node)
return -1;
}
}
-#endif
+#endif
return retval;
@@ -118,28 +118,28 @@ TranzportControlProtocol::set_state (const XMLNode& node)
// And perhaps we could load up sessions this way, too
int
-TranzportControlProtocol::save (char *name)
+TranzportControlProtocol::save (char *name)
{
// Presently unimplemented
return 0;
}
int
-TranzportControlProtocol::load (char *name)
+TranzportControlProtocol::load (char *name)
{
// Presently unimplemented
return 0;
}
int
-TranzportControlProtocol::save_config (char *name)
+TranzportControlProtocol::save_config (char *name)
{
// Presently unimplemented
return 0;
}
int
-TranzportControlProtocol::load_config (char *name)
+TranzportControlProtocol::load_config (char *name)
{
// Presently unimplemented
return 0;
diff --git a/libs/surfaces/tranzport/tranzport_base.h b/libs/surfaces/tranzport/tranzport_base.h
index ef77748c50..84a5b680a8 100644
--- a/libs/surfaces/tranzport/tranzport_base.h
+++ b/libs/surfaces/tranzport/tranzport_base.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2006 Paul Davis
+ * Copyright (C) 2006 Paul Davis
* Copyright (C) 2007 Michael Taht
*
* This program is free software; you can redistribute it and/or modify
@@ -15,26 +15,26 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
+ *
* */
/* This header file is basically where all the tranzport debuggable options go.
Try to only check it in with minimal debugging enabled so production
systems don't have to fiddle with it. */
-/* Design notes: The tranzport is a unique device, basically a
- 20x2 character lcd gui with (almost) 22 shift keys and 8 blinking lights.
+/* Design notes: The tranzport is a unique device, basically a
+ 20x2 character lcd gui with (almost) 22 shift keys and 8 blinking lights.
As such it has several unique constraints. In the libusb driver,
the device exerts flow control
by having a usb write fail. It is pointless to retry madly at that point,
- the device is busy, and it's not going to become unbusy very quickly.
+ the device is busy, and it's not going to become unbusy very quickly.
- So writes need to be either "mandatory" or "unreliable", and therein
+ So writes need to be either "mandatory" or "unreliable", and therein
lies the rub, as the kernel can also drop writes, and missing an
- interrupt in userspace is also generally bad.
+ interrupt in userspace is also generally bad.
- However, the kernel driver retries writes for you and also buffers and
+ However, the kernel driver retries writes for you and also buffers and
compresses incoming wheel events - it will rarely, if ever, drop data.
A more complex surface might have hundreds of lights and several displays.
@@ -61,7 +61,7 @@
// for now, this is what the device is called
#define TRANZPORT_DEVICE "/dev/tranzport0"
-#if DEBUG_TRANZPORT > 0
+#if DEBUG_TRANZPORT > 0
#define DEBUG_TRANZPORT_SCREEN 10
#define DEBUG_TRANZPORT_BITS 10
#define DEBUG_TRANZPORT_LIGHTS 10
diff --git a/libs/surfaces/tranzport/tranzport_common.h b/libs/surfaces/tranzport/tranzport_common.h
index b3a2da513a..a0fe13d02b 100644
--- a/libs/surfaces/tranzport/tranzport_common.h
+++ b/libs/surfaces/tranzport/tranzport_common.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2006 Paul Davis
+ * Copyright (C) 2006 Paul Davis
* Copyright (C) 2007 Michael Taht
*
* This program is free software; you can redistribute it and/or modify
@@ -15,17 +15,17 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
+ *
* */
/* The most common header files that the tranzport uses */
#ifndef ardour_tranzport_common
-#define ardour_tranzport_common
+#define ardour_tranzport_common
#include <iostream>
-#include <algorithm>
-#include <cmath>
-
+#include <algorithm>
+#include <cmath>
+
#define __STDC_FORMAT_MACROS
#include <inttypes.h>
#include <float.h>
diff --git a/libs/surfaces/tranzport/tranzport_control_protocol.h b/libs/surfaces/tranzport/tranzport_control_protocol.h
index 1c318007b0..aa60d5399f 100644
--- a/libs/surfaces/tranzport/tranzport_control_protocol.h
+++ b/libs/surfaces/tranzport/tranzport_control_protocol.h
@@ -1,5 +1,5 @@
/*
- 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
@@ -59,7 +59,7 @@ private:
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;
@@ -97,7 +97,7 @@ private:
ButtonPlay = 0x00100000,
ButtonRecord = 0x00000100,
ButtonShift = 0x08000000,
- ButtonFootswitch = 0x00001000
+ ButtonFootswitch = 0x00001000
};
enum WheelShiftMode {
@@ -124,7 +124,7 @@ private:
WheelIncrSecond,
WheelIncrMinute
};
-
+
enum DisplayMode {
DisplayNormal,
DisplayRecording,
@@ -183,7 +183,7 @@ private:
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;
@@ -241,10 +241,10 @@ private:
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();
@@ -293,7 +293,7 @@ private:
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 ();
diff --git a/libs/surfaces/tranzport/view_automation.cc b/libs/surfaces/tranzport/view_automation.cc
index 4c0b18acf0..ad9befd9b9 100644
--- a/libs/surfaces/tranzport/view_automation.cc
+++ b/libs/surfaces/tranzport/view_automation.cc
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2006 Paul Davis
+ * Copyright (C) 2006 Paul Davis
* Copyright (C) 2007 Michael Taht
*
* This program is free software; you can redistribute it and/or modify
@@ -15,7 +15,7 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
+ *
* */
diff --git a/libs/surfaces/tranzport/view_bigmeter.cc b/libs/surfaces/tranzport/view_bigmeter.cc
index 4c0b18acf0..ad9befd9b9 100644
--- a/libs/surfaces/tranzport/view_bigmeter.cc
+++ b/libs/surfaces/tranzport/view_bigmeter.cc
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2006 Paul Davis
+ * Copyright (C) 2006 Paul Davis
* Copyright (C) 2007 Michael Taht
*
* This program is free software; you can redistribute it and/or modify
@@ -15,7 +15,7 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
+ *
* */
diff --git a/libs/surfaces/tranzport/view_bling.cc b/libs/surfaces/tranzport/view_bling.cc
index 4c0b18acf0..ad9befd9b9 100644
--- a/libs/surfaces/tranzport/view_bling.cc
+++ b/libs/surfaces/tranzport/view_bling.cc
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2006 Paul Davis
+ * Copyright (C) 2006 Paul Davis
* Copyright (C) 2007 Michael Taht
*
* This program is free software; you can redistribute it and/or modify
@@ -15,7 +15,7 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
+ *
* */
diff --git a/libs/surfaces/tranzport/view_bus.cc b/libs/surfaces/tranzport/view_bus.cc
index 4c0b18acf0..ad9befd9b9 100644
--- a/libs/surfaces/tranzport/view_bus.cc
+++ b/libs/surfaces/tranzport/view_bus.cc
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2006 Paul Davis
+ * Copyright (C) 2006 Paul Davis
* Copyright (C) 2007 Michael Taht
*
* This program is free software; you can redistribute it and/or modify
@@ -15,7 +15,7 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
+ *
* */
diff --git a/libs/surfaces/tranzport/view_config.cc b/libs/surfaces/tranzport/view_config.cc
index 4c0b18acf0..ad9befd9b9 100644
--- a/libs/surfaces/tranzport/view_config.cc
+++ b/libs/surfaces/tranzport/view_config.cc
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2006 Paul Davis
+ * Copyright (C) 2006 Paul Davis
* Copyright (C) 2007 Michael Taht
*
* This program is free software; you can redistribute it and/or modify
@@ -15,7 +15,7 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
+ *
* */
diff --git a/libs/surfaces/tranzport/view_layer.cc b/libs/surfaces/tranzport/view_layer.cc
index 8de9e3ad14..a350c08687 100644
--- a/libs/surfaces/tranzport/view_layer.cc
+++ b/libs/surfaces/tranzport/view_layer.cc
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2006 Paul Davis
+ * Copyright (C) 2006 Paul Davis
* Copyright (C) 2007 Michael Taht
*
* This program is free software; you can redistribute it and/or modify
@@ -15,7 +15,7 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
+ *
* */
/* ultimately this view will let you: rotate layers (takes) on the currently selected track/region, do cross fades, and the like */
diff --git a/libs/surfaces/tranzport/view_loop.cc b/libs/surfaces/tranzport/view_loop.cc
index 4c0b18acf0..ad9befd9b9 100644
--- a/libs/surfaces/tranzport/view_loop.cc
+++ b/libs/surfaces/tranzport/view_loop.cc
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2006 Paul Davis
+ * Copyright (C) 2006 Paul Davis
* Copyright (C) 2007 Michael Taht
*
* This program is free software; you can redistribute it and/or modify
@@ -15,7 +15,7 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
+ *
* */
diff --git a/libs/surfaces/tranzport/view_manymeter.cc b/libs/surfaces/tranzport/view_manymeter.cc
index 4c0b18acf0..ad9befd9b9 100644
--- a/libs/surfaces/tranzport/view_manymeter.cc
+++ b/libs/surfaces/tranzport/view_manymeter.cc
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2006 Paul Davis
+ * Copyright (C) 2006 Paul Davis
* Copyright (C) 2007 Michael Taht
*
* This program is free software; you can redistribute it and/or modify
@@ -15,7 +15,7 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
+ *
* */
diff --git a/libs/surfaces/tranzport/view_marker.cc b/libs/surfaces/tranzport/view_marker.cc
index 4c0b18acf0..ad9befd9b9 100644
--- a/libs/surfaces/tranzport/view_marker.cc
+++ b/libs/surfaces/tranzport/view_marker.cc
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2006 Paul Davis
+ * Copyright (C) 2006 Paul Davis
* Copyright (C) 2007 Michael Taht
*
* This program is free software; you can redistribute it and/or modify
@@ -15,7 +15,7 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
+ *
* */
diff --git a/libs/surfaces/tranzport/view_master.cc b/libs/surfaces/tranzport/view_master.cc
index 4c0b18acf0..ad9befd9b9 100644
--- a/libs/surfaces/tranzport/view_master.cc
+++ b/libs/surfaces/tranzport/view_master.cc
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2006 Paul Davis
+ * Copyright (C) 2006 Paul Davis
* Copyright (C) 2007 Michael Taht
*
* This program is free software; you can redistribute it and/or modify
@@ -15,7 +15,7 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
+ *
* */
diff --git a/libs/surfaces/tranzport/view_plugins.cc b/libs/surfaces/tranzport/view_plugins.cc
index 4c0b18acf0..ad9befd9b9 100644
--- a/libs/surfaces/tranzport/view_plugins.cc
+++ b/libs/surfaces/tranzport/view_plugins.cc
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2006 Paul Davis
+ * Copyright (C) 2006 Paul Davis
* Copyright (C) 2007 Michael Taht
*
* This program is free software; you can redistribute it and/or modify
@@ -15,7 +15,7 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
+ *
* */
diff --git a/libs/surfaces/tranzport/view_std.cc b/libs/surfaces/tranzport/view_std.cc
index 4c0b18acf0..ad9befd9b9 100644
--- a/libs/surfaces/tranzport/view_std.cc
+++ b/libs/surfaces/tranzport/view_std.cc
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2006 Paul Davis
+ * Copyright (C) 2006 Paul Davis
* Copyright (C) 2007 Michael Taht
*
* This program is free software; you can redistribute it and/or modify
@@ -15,7 +15,7 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
+ *
* */
diff --git a/libs/surfaces/tranzport/view_tempo.cc b/libs/surfaces/tranzport/view_tempo.cc
index 4c0b18acf0..ad9befd9b9 100644
--- a/libs/surfaces/tranzport/view_tempo.cc
+++ b/libs/surfaces/tranzport/view_tempo.cc
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2006 Paul Davis
+ * Copyright (C) 2006 Paul Davis
* Copyright (C) 2007 Michael Taht
*
* This program is free software; you can redistribute it and/or modify
@@ -15,7 +15,7 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
+ *
* */
diff --git a/libs/surfaces/tranzport/view_tuner.cc b/libs/surfaces/tranzport/view_tuner.cc
index 4c0b18acf0..ad9befd9b9 100644
--- a/libs/surfaces/tranzport/view_tuner.cc
+++ b/libs/surfaces/tranzport/view_tuner.cc
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2006 Paul Davis
+ * Copyright (C) 2006 Paul Davis
* Copyright (C) 2007 Michael Taht
*
* This program is free software; you can redistribute it and/or modify
@@ -15,7 +15,7 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
+ *
* */
diff --git a/libs/surfaces/tranzport/wheel.cc b/libs/surfaces/tranzport/wheel.cc
index 3f15e060a2..8122b8a77d 100644
--- a/libs/surfaces/tranzport/wheel.cc
+++ b/libs/surfaces/tranzport/wheel.cc
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2006 Paul Davis
+ * Copyright (C) 2006 Paul Davis
* Copyright (C) 2007 Michael Taht
*
* This program is free software; you can redistribute it and/or modify
@@ -15,7 +15,7 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
+ *
* */
#include <iostream>
diff --git a/libs/surfaces/tranzport/wheel_modes.cc b/libs/surfaces/tranzport/wheel_modes.cc
index a7861fc5ed..565a68de20 100644
--- a/libs/surfaces/tranzport/wheel_modes.cc
+++ b/libs/surfaces/tranzport/wheel_modes.cc
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2006 Paul Davis
+ * Copyright (C) 2006 Paul Davis
* Copyright (C) 2007 Michael Taht
*
* This program is free software; you can redistribute it and/or modify
@@ -15,7 +15,7 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
+ *
*/
#include <iostream>
@@ -100,7 +100,7 @@ TranzportControlProtocol::show_wheel_mode ()
// if ? greater. dont
if(session->transport_speed() != 0) {
- show_mini_meter();
+ show_mini_meter();
} else {
switch (wheel_mode) {
@@ -134,5 +134,5 @@ TranzportControlProtocol::show_wheel_mode ()
}
print (1, 0, text.c_str());
- }
+ }
}