Browse Source

More comments.

tags/non-daw-v1.1.0
Jonathan Moore Liles 17 years ago
parent
commit
9c19d865bb
9 changed files with 84 additions and 52 deletions
  1. +3
    -0
      Timeline/Audio_Sequence.C
  2. +1
    -1
      Timeline/LASH.C
  3. +6
    -1
      Timeline/LASH_Client.C
  4. +7
    -0
      Timeline/Loggable.C
  5. +2
    -0
      Timeline/Project.C
  6. +3
    -0
      Timeline/Timeline.C
  7. +6
    -0
      Timeline/Track.C
  8. +54
    -50
      Timeline/Transport.C
  9. +2
    -0
      Timeline/Waveform.C

+ 3
- 0
Timeline/Audio_Sequence.C View File

@@ -17,6 +17,9 @@
/* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/*******************************************************************************/

/* An Audio_Sequence is a sequence of Audio_Regions. Takes and 'track
* contents' consist of these objects */

#include <Fl/fl_ask.H>

#include "Audio_Sequence.H"


+ 1
- 1
Timeline/LASH.C View File

@@ -17,7 +17,7 @@
/* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/*******************************************************************************/

/* actual implementation of our side of the LASH protocol */
/* Actual implementation of our side of the LASH protocol */

/* NOTES: Since LASH doesn't provide us with the information we
* need--when we need it--we just punt and only use LASH to save and


+ 6
- 1
Timeline/LASH_Client.C View File

@@ -17,11 +17,14 @@
/* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/*******************************************************************************/

#include "LASH_Client.H"
/* Handler based wrapper for LASH */

#include "LASH_Client.H"

#include "util/debug.h"


LASH_Client::LASH_Client ( )
{
_void = 0;
@@ -32,6 +35,8 @@ LASH_Client::~LASH_Client ( )
/* TODO: anything? */
}


#ifdef HAVE_LASH

#include <lash/lash.h>


+ 7
- 0
Timeline/Loggable.C View File

@@ -17,6 +17,13 @@
/* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/*******************************************************************************/

/* This class handles all journaling. All journaled objects must
inherit from Loggable as well as define a few special methods (via
macros), get and set methods, and have contructors and destructors
that call log_create() and log_destroy() in the appropriate
order. Any action that might affect multiple loggable objects
*must* be braced by calls to Loggable::block_start() and
Loggable::block_end() in order for Undo to work properly. */

#include "Loggable.H"



+ 2
- 0
Timeline/Project.C View File

@@ -20,6 +20,8 @@
/* Routings for opening/closing/creation of projects. All the actual
project state belongs to Timeline and other classes. */

/* Project management routines. */

#include <stdio.h>
#include <stdlib.h>
#include <string.h>


+ 3
- 0
Timeline/Timeline.C View File

@@ -17,6 +17,9 @@
/* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/*******************************************************************************/

/* This is the Timeline widget, which contains all the tracks and
* provides cursor overlays, scrolling, zooming, measure lines, tempo
* map and just about everything else. */

#include <FL/Fl_Scroll.H>
#include <FL/Fl_Pack.H>


+ 6
- 0
Timeline/Track.C View File

@@ -17,6 +17,12 @@
/* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/*******************************************************************************/

/* A Track is a container for various sequences; the sequence, the
* takes (inactive sequences), annotation sequences, control
* sequences */
/* TODO: split into Track and Audio_Track (and maybe later Video_Track
* and MIDI_Track */

#include "Track.H"

#include "Transport.H"


+ 54
- 50
Timeline/Transport.C View File

@@ -17,6 +17,7 @@
/* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/*******************************************************************************/

/* Controls the audio transport */

#include "Transport.H"

@@ -26,56 +27,7 @@

#define client engine->client()

void
Transport::poll ( void )
{
jack_transport_state_t ts;

ts = jack_transport_query( client, this );

rolling = ts == JackTransportRolling;
}

void
Transport::locate ( nframes_t frame )
{
jack_transport_locate( client, frame );
}


void
Transport::start ( void )
{
// MESSAGE( "Starting transport" );
if ( _record_button->value() )
timeline->record();

jack_transport_start( client );
}

void
Transport::stop ( void )
{
// MESSAGE( "Stopping transport" );
if ( _record_button->value() )
toggle_record();

jack_transport_stop( client );
}

void
Transport::toggle ( void )
{
if ( rolling )
stop();
else
start();
}


/*******/
/* GUI */
/*******/

Transport::Transport ( int X, int Y, int W, int H, const char *L )
: Fl_Pack( X, Y, W, H, L )
@@ -118,6 +70,8 @@ Transport::Transport ( int X, int Y, int W, int H, const char *L )
end();
}


void
Transport::cb_button ( Fl_Widget *w, void *v )
{
@@ -174,3 +128,53 @@ Transport::handle ( int m )
return Fl_Pack::handle( m );

}

/***********/
/* Control */
/***********/

void
Transport::poll ( void )
{
jack_transport_state_t ts;

ts = jack_transport_query( client, this );

rolling = ts == JackTransportRolling;
}

void
Transport::locate ( nframes_t frame )
{
jack_transport_locate( client, frame );
}


void
Transport::start ( void )
{
// MESSAGE( "Starting transport" );
if ( _record_button->value() )
timeline->record();

jack_transport_start( client );
}

void
Transport::stop ( void )
{
// MESSAGE( "Stopping transport" );
if ( _record_button->value() )
toggle_record();

jack_transport_stop( client );
}

void
Transport::toggle ( void )
{
if ( rolling )
stop();
else
start();
}

+ 2
- 0
Timeline/Waveform.C View File

@@ -17,6 +17,8 @@
/* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/*******************************************************************************/

/* routines to draw a waveform from peak data */

#include <FL/fl_draw.H>

#include "Waveform.H"


Loading…
Cancel
Save