Add bindings to stop, start, and zero transport.
This commit is contained in:
parent
2a7f14870c
commit
0a6a6b4a0a
|
@ -702,6 +702,12 @@ Timeline::handle ( int m )
|
|||
|
||||
return 1;
|
||||
}
|
||||
case FL_Home:
|
||||
transport.locate( 0 );
|
||||
return 1;
|
||||
case ' ':
|
||||
transport.toggle();
|
||||
return 1;
|
||||
case 'p':
|
||||
{
|
||||
int X = Fl::event_x() - Track::width();
|
||||
|
|
|
@ -22,12 +22,14 @@
|
|||
|
||||
Transport transport;
|
||||
|
||||
#define client engine->client()
|
||||
|
||||
void
|
||||
Transport::poll ( void )
|
||||
{
|
||||
jack_transport_state_t ts;
|
||||
|
||||
ts = jack_transport_query( engine->client(), this );
|
||||
ts = jack_transport_query( client, this );
|
||||
|
||||
rolling = ts == JackTransportRolling;
|
||||
}
|
||||
|
@ -35,5 +37,29 @@ Transport::poll ( void )
|
|||
void
|
||||
Transport::locate ( nframes_t frame )
|
||||
{
|
||||
jack_transport_locate( engine->client(), frame );
|
||||
jack_transport_locate( client, frame );
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
Transport::start ( void )
|
||||
{
|
||||
// MESSAGE( "Starting transport" );
|
||||
jack_transport_start( client );
|
||||
}
|
||||
|
||||
void
|
||||
Transport::stop ( void )
|
||||
{
|
||||
// MESSAGE( "Stopping transport" );
|
||||
jack_transport_stop( client );
|
||||
}
|
||||
|
||||
void
|
||||
Transport::toggle ( void )
|
||||
{
|
||||
if ( rolling )
|
||||
stop();
|
||||
else
|
||||
start();
|
||||
}
|
||||
|
|
|
@ -28,6 +28,9 @@ struct Transport : public jack_position_t
|
|||
|
||||
void poll ( void );
|
||||
void locate ( nframes_t frame );
|
||||
void start ( void );
|
||||
void stop ( void );
|
||||
void toggle ( void );
|
||||
};
|
||||
|
||||
extern Transport transport;
|
||||
|
|
Loading…
Reference in New Issue