diff options
Diffstat (limited to 'libs/surfaces/tranzport')
-rw-r--r-- | libs/surfaces/tranzport/bling.cc | 2 | ||||
-rw-r--r-- | libs/surfaces/tranzport/buttons.cc | 2 | ||||
-rw-r--r-- | libs/surfaces/tranzport/general.cc | 12 | ||||
-rw-r--r-- | libs/surfaces/tranzport/init.cc | 6 | ||||
-rw-r--r-- | libs/surfaces/tranzport/interface.cc | 4 | ||||
-rw-r--r-- | libs/surfaces/tranzport/io.cc | 6 | ||||
-rw-r--r-- | libs/surfaces/tranzport/io_kernel.cc | 6 | ||||
-rw-r--r-- | libs/surfaces/tranzport/io_usb.cc | 10 | ||||
-rw-r--r-- | libs/surfaces/tranzport/lcd.cc | 4 | ||||
-rw-r--r-- | libs/surfaces/tranzport/show.cc | 14 | ||||
-rw-r--r-- | libs/surfaces/tranzport/state.cc | 2 | ||||
-rw-r--r-- | libs/surfaces/tranzport/tranzport_control_protocol.h | 6 | ||||
-rw-r--r-- | libs/surfaces/tranzport/wheel.cc | 46 | ||||
-rw-r--r-- | libs/surfaces/tranzport/wheel_modes.cc | 12 |
14 files changed, 66 insertions, 66 deletions
diff --git a/libs/surfaces/tranzport/bling.cc b/libs/surfaces/tranzport/bling.cc index ea2ef56d42..308430af68 100644 --- a/libs/surfaces/tranzport/bling.cc +++ b/libs/surfaces/tranzport/bling.cc @@ -109,7 +109,7 @@ bling::scrollmsg() { // Based on the current bling mode, do whatever it is you are going to do bling::run() { - + } // etc diff --git a/libs/surfaces/tranzport/buttons.cc b/libs/surfaces/tranzport/buttons.cc index 99bcccc902..a35f025489 100644 --- a/libs/surfaces/tranzport/buttons.cc +++ b/libs/surfaces/tranzport/buttons.cc @@ -55,7 +55,7 @@ TranzportControlProtocol::process (uint8_t* buf) this_button_mask |= buf[4] << 8; this_button_mask |= buf[5]; _datawheel = buf[6]; - + #if DEBUG_TRANZPORT_STATE > 1 // Is the state machine incomplete? const unsigned int knownstates = 0x00004000|0x00008000| diff --git a/libs/surfaces/tranzport/general.cc b/libs/surfaces/tranzport/general.cc index d051b36d1d..35d2f2bb3b 100644 --- a/libs/surfaces/tranzport/general.cc +++ b/libs/surfaces/tranzport/general.cc @@ -76,7 +76,7 @@ int TranzportControlProtocol::lights_show_bling() case BlingPairs: break; // Show pairs of lights case BlingRows: break; // light each row in sequence case BlingFlashAll: break; // Flash everything randomly - case BlingEnter: lights_on(); // Show intro + case BlingEnter: lights_on(); // Show intro case BlingExit: lights_off(); break; @@ -93,7 +93,7 @@ int TranzportControlProtocol::screen_show_bling() case BlingPairs: break; // Show pairs of lights case BlingRows: break; // light each row in sequence case BlingFlashAll: break; // Flash everything randomly - case BlingEnter: // Show intro + case BlingEnter: // Show intro print(0,0,"!!Welcome to Ardour!"); print(1,0,"Peace through Music!"); break; @@ -182,7 +182,7 @@ void TranzportControlProtocol::prev_marker () { Location *location = session->locations()->first_location_before (session->transport_frame()); - + if (location) { session->request_locate (location->start(), session->transport_rolling()); notify(location->name().c_str()); @@ -242,7 +242,7 @@ TranzportControlProtocol::step_gain (float increment) if (fabsf(gain_fraction) > 2.0) { gain_fraction = 2.0*sign(gain_fraction); } - + route_set_gain (0, slider_position_to_gain (gain_fraction)); } #endif @@ -259,7 +259,7 @@ TranzportControlProtocol::step_gain_up () if (gain_fraction > 2.0) { gain_fraction = 2.0; } - + route_set_gain (0, slider_position_to_gain (gain_fraction)); } @@ -275,7 +275,7 @@ TranzportControlProtocol::step_gain_down () if (gain_fraction < 0.0) { gain_fraction = 0.0; } - + route_set_gain (0, slider_position_to_gain (gain_fraction)); } diff --git a/libs/surfaces/tranzport/init.cc b/libs/surfaces/tranzport/init.cc index 3a01185407..459da81cbc 100644 --- a/libs/surfaces/tranzport/init.cc +++ b/libs/surfaces/tranzport/init.cc @@ -65,7 +65,7 @@ int TranzportControlProtocol::rtpriority_unset(int priority) struct sched_param rtparam; int err; memset (&rtparam, 0, sizeof (rtparam)); - rtparam.sched_priority = priority; + rtparam.sched_priority = 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; @@ -208,7 +208,7 @@ TranzportControlProtocol::monitor_work () case 3: val = read(buf,DEFAULT_USB_TIMEOUT*2); break; // Hoo, boy, we're in trouble default: break; // not reached } - + #if DEBUG_TRANZPORT_BITS > 9 if(_device_status != STATUS_OFFLINE && _device_status != STATUS_ONLINE && _device_status != STATUS_OK) { printf("The device has more status bits than off or online: %d\n",_device_status); @@ -265,7 +265,7 @@ TranzportControlProtocol::monitor_work () 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]); diff --git a/libs/surfaces/tranzport/interface.cc b/libs/surfaces/tranzport/interface.cc index ac4341cde8..514cfbe4fb 100644 --- a/libs/surfaces/tranzport/interface.cc +++ b/libs/surfaces/tranzport/interface.cc @@ -34,7 +34,7 @@ new_tranzport_protocol (ControlProtocolDescriptor* descriptor, Session* s) } return tcp; - + } static void @@ -60,7 +60,7 @@ static ControlProtocolDescriptor tranzport_descriptor = { initialize : new_tranzport_protocol, destroy : delete_tranzport_protocol }; - + extern "C" ARDOURSURFACE_API ControlProtocolDescriptor* protocol_descriptor () { return &tranzport_descriptor; } diff --git a/libs/surfaces/tranzport/io.cc b/libs/surfaces/tranzport/io.cc index 39be2c2e51..3fe1b554ca 100644 --- a/libs/surfaces/tranzport/io.cc +++ b/libs/surfaces/tranzport/io.cc @@ -67,10 +67,10 @@ TranzportControlProtocol::lights_flush () printf("LPEND : %s\n", lights_pending.to_string().c_str()); printf("LCURR : %s\n", lights_current.to_string().c_str()); #endif - + // if ever we thread reads/writes STATUS_OK will have to move into the loop int i; - + if ( _device_status == STATUS_OK || _device_status == STATUS_ONLINE) { for (i = 0; i<LIGHTS; i++) { if(light_state[i]) { @@ -90,6 +90,6 @@ TranzportControlProtocol::lights_flush () #if DEBUG_TRANZPORT_LIGHTS > 2 printf("Did %d light writes, left: %d\n",i, light_state.count()); #endif - + return light_state.count(); } diff --git a/libs/surfaces/tranzport/io_kernel.cc b/libs/surfaces/tranzport/io_kernel.cc index 0532ee7e6b..6c2bc37922 100644 --- a/libs/surfaces/tranzport/io_kernel.cc +++ b/libs/surfaces/tranzport/io_kernel.cc @@ -92,7 +92,7 @@ int TranzportControlProtocol::read(uint8_t *buf, uint32_t timeout_override) return last_read_error; } - + int TranzportControlProtocol::write_noretry (uint8_t* cmd, uint32_t timeout_override) { @@ -131,13 +131,13 @@ TranzportControlProtocol::write_noretry (uint8_t* cmd, uint32_t timeout_override return 0; -} +} int TranzportControlProtocol::write (uint8_t* cmd, uint32_t timeout_override) { return (write_noretry(cmd,timeout_override)); -} +} // FIXME - install poll semantics #endif /* HAVE_TRANZPORT_KERNEL_DRIVER */ diff --git a/libs/surfaces/tranzport/io_usb.cc b/libs/surfaces/tranzport/io_usb.cc index 5d4e75f7d1..56d270b62a 100644 --- a/libs/surfaces/tranzport/io_usb.cc +++ b/libs/surfaces/tranzport/io_usb.cc @@ -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); @@ -158,7 +158,7 @@ int TranzportControlProtocol::read(uint8_t *buf, uint32_t timeout_override) return last_read_error; } - + int TranzportControlProtocol::write_noretry (uint8_t* cmd, uint32_t timeout_override) { @@ -195,7 +195,7 @@ TranzportControlProtocol::write_noretry (uint8_t* cmd, uint32_t timeout_override return 0; -} +} int TranzportControlProtocol::write (uint8_t* cmd, uint32_t timeout_override) @@ -204,7 +204,7 @@ TranzportControlProtocol::write (uint8_t* cmd, uint32_t timeout_override) int val; int retry = 0; if(inflight > MAX_TRANZPORT_INFLIGHT) { return (-1); } - + while((val = usb_interrupt_write (udev, WRITE_ENDPOINT, (char*) cmd, 8, timeout_override ? timeout_override : timeout))!=8 && retry++ < MAX_RETRY) { printf("usb_interrupt_write failed, retrying: %d\n", val); } @@ -227,6 +227,6 @@ TranzportControlProtocol::write (uint8_t* cmd, uint32_t timeout_override) return (write_noretry(cmd,timeout_override)); #endif -} +} #endif diff --git a/libs/surfaces/tranzport/lcd.cc b/libs/surfaces/tranzport/lcd.cc index 592bf7cf00..7e9e03c8f2 100644 --- a/libs/surfaces/tranzport/lcd.cc +++ b/libs/surfaces/tranzport/lcd.cc @@ -44,7 +44,7 @@ bool TranzportControlProtocol::lcd_damage (int row, int col, int length) bool TranzportControlProtocol::lcd_isdamaged () { if(screen_invalid.any()) { -#if DEBUG_TRANZPORT > 5 +#if DEBUG_TRANZPORT > 5 printf("LCD is damaged somewhere, should redraw it\n"); #endif return true; @@ -60,7 +60,7 @@ bool TranzportControlProtocol::lcd_isdamaged (int row, int col, int length) std::bitset<ROWS*COLUMNS> mask(mask1 << (row*COLUMNS+col)); mask &= screen_invalid; if(mask.any()) { -#if DEBUG_TRANZPORT > 5 +#if DEBUG_TRANZPORT > 5 printf("row: %d,col: %d is damaged, should redraw it\n", row,col); #endif return true; diff --git a/libs/surfaces/tranzport/show.cc b/libs/surfaces/tranzport/show.cc index 6d97abf43a..544bb3df96 100644 --- a/libs/surfaces/tranzport/show.cc +++ b/libs/surfaces/tranzport/show.cc @@ -169,7 +169,7 @@ void TranzportControlProtocol::show_mini_meter() } last_meter_fill_l = fill_left; last_meter_fill_r = fill_right; - + // give some feedback when overdriving - override yellow and red lights if (fraction_l > 0.96 || fraction_r > 0.96) { @@ -179,7 +179,7 @@ void TranzportControlProtocol::show_mini_meter() if (fraction_l == 1.0 || fraction_r == 1.0) { light_on (LightTrackrec); } - + const uint8_t char_map[16] = { ' ', TRANZ_UL, TRANZ_U, TRANZ_U, TRANZ_BL, TRANZ_Q2, @@ -196,7 +196,7 @@ void TranzportControlProtocol::show_mini_meter() ((fill_right >=j) << 2) | ((fill_right >= j+1) << 3); buf[i] = char_map[val]; } - + /* print() requires this */ buf[meter_size/2] = '\0'; @@ -204,11 +204,11 @@ void TranzportControlProtocol::show_mini_meter() print (1, 0, buf); /* Add a peak bar, someday do falloff */ - + // 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. - + } void @@ -261,7 +261,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 */ if (i < 20 && add_single_level) { @@ -349,7 +349,7 @@ void TranzportControlProtocol::show_transport_time () { show_bbt (session->transport_frame ()); -} +} void TranzportControlProtocol::show_timecode (framepos_t where) diff --git a/libs/surfaces/tranzport/state.cc b/libs/surfaces/tranzport/state.cc index f5718174be..59eaef0460 100644 --- a/libs/surfaces/tranzport/state.cc +++ b/libs/surfaces/tranzport/state.cc @@ -60,7 +60,7 @@ TranzportControlProtocol::set_state (const XMLNode& node) int retval = 0; // I think I want to make these strings rather than numbers -#if 0 +#if 0 // fetch current display mode if ( node.property( X_("display_mode") ) != 0 ) { diff --git a/libs/surfaces/tranzport/tranzport_control_protocol.h b/libs/surfaces/tranzport/tranzport_control_protocol.h index aa60d5399f..32d88aaf5e 100644 --- a/libs/surfaces/tranzport/tranzport_control_protocol.h +++ b/libs/surfaces/tranzport/tranzport_control_protocol.h @@ -106,7 +106,7 @@ private: WheelShiftMaster, WheelShiftMarker }; - + enum WheelMode { WheelTimeline, WheelScrub, @@ -124,7 +124,7 @@ private: WheelIncrSecond, WheelIncrMinute }; - + enum DisplayMode { DisplayNormal, DisplayRecording, @@ -301,7 +301,7 @@ private: void show_current_track (); void show_track_gain (); void show_transport_time (); - void show_bbt (framepos_t where); + void show_bbt (framepos_t where); void show_timecode (framepos_t where); void show_wheel_mode (); void show_gain (); diff --git a/libs/surfaces/tranzport/wheel.cc b/libs/surfaces/tranzport/wheel.cc index 8122b8a77d..d90e0e2b6e 100644 --- a/libs/surfaces/tranzport/wheel.cc +++ b/libs/surfaces/tranzport/wheel.cc @@ -55,7 +55,7 @@ TranzportControlProtocol::datawheel () if ((buttonmask & ButtonTrackRight) || (buttonmask & ButtonTrackLeft)) { /* track scrolling */ - + if (_datawheel < WheelDirectionThreshold) { next_track (); } else { @@ -63,7 +63,7 @@ TranzportControlProtocol::datawheel () } last_wheel_motion = 0; - + } else if ((buttonmask & ButtonPrev) || (buttonmask & ButtonNext)) { if (_datawheel < WheelDirectionThreshold) { @@ -71,13 +71,13 @@ TranzportControlProtocol::datawheel () } else { prev_marker (); } - + last_wheel_motion = 0; - + } else if (buttonmask & ButtonShift) { - + /* parameter control */ - + if (route_table[0]) { switch (wheel_shift_mode) { case WheelShiftGain: @@ -94,29 +94,29 @@ TranzportControlProtocol::datawheel () step_pan_left (); } break; - + case WheelShiftMarker: break; - + case WheelShiftMaster: break; - + } } - + last_wheel_motion = 0; - + } else { - + switch (wheel_mode) { case WheelTimeline: scroll (); break; - + case WheelScrub: scrub (); break; - + case WheelShuttle: shuttle (); break; @@ -151,35 +151,35 @@ TranzportControlProtocol::scrub () float speed; uint64_t now; int dir; - + now = g_get_monotonic_time(); - + if (_datawheel < WheelDirectionThreshold) { dir = 1; } else { dir = -1; } - + if (dir != last_wheel_dir) { /* changed direction, start over */ speed = 0.1f; } else { if (last_wheel_motion != 0) { /* 10 clicks per second => speed == 1.0 */ - + speed = 100000.0f / (float) (now - last_wheel_motion) - + } else { - + /* start at half-speed and see where we go from there */ - + speed = 0.5f; } } - + last_wheel_motion = now; last_wheel_dir = dir; - + set_transport_speed (speed * dir); } diff --git a/libs/surfaces/tranzport/wheel_modes.cc b/libs/surfaces/tranzport/wheel_modes.cc index 565a68de20..6880218ff0 100644 --- a/libs/surfaces/tranzport/wheel_modes.cc +++ b/libs/surfaces/tranzport/wheel_modes.cc @@ -102,7 +102,7 @@ TranzportControlProtocol::show_wheel_mode () if(session->transport_speed() != 0) { show_mini_meter(); } else { - + switch (wheel_mode) { case WheelTimeline: text = "Time"; @@ -114,25 +114,25 @@ TranzportControlProtocol::show_wheel_mode () text = "Shtl"; break; } - + switch (wheel_shift_mode) { case WheelShiftGain: text += ":Gain"; break; - + case WheelShiftPan: text += ":Pan "; break; - + case WheelShiftMaster: text += ":Mstr"; break; - + case WheelShiftMarker: text += ":Mrkr"; break; } - + print (1, 0, text.c_str()); } } |