Browse Source

Log auido tracks as Audio_Track.

tags/non-daw-v1.1.0
Jonathan Moore Liles 17 years ago
parent
commit
90a5568a20
4 changed files with 26 additions and 11 deletions
  1. +6
    -0
      Audio_Track.H
  2. +7
    -0
      Control_Track.H
  3. +2
    -2
      Track.C
  4. +11
    -9
      Track.H

+ 6
- 0
Audio_Track.H View File

@@ -31,6 +31,12 @@ public:

Audio_Track ( int X, int Y, int W, int H ) : Track( X, Y, W, H )
{
log_create();
}

~Audio_Track ( )
{
log_destroy();
}




+ 7
- 0
Control_Track.H View File

@@ -31,6 +31,13 @@ public:
Control_Track ( int X, int Y, int W, int H ) : Track( X, Y, W, H )
{
color( fl_darker( FL_GREEN ) );

log_create();
}

~Control_Track ( )
{
log_destroy();
}

const char *class_name ( void ) { return "Control_Track"; }


+ 2
- 2
Track.C View File

@@ -37,7 +37,7 @@ Track::Track ( int X, int Y, int W, int H ) : Fl_Widget( X, Y, W, H )
color( fl_darker( FL_GRAY ) );
align( FL_ALIGN_LEFT );

log_create();
// log_create();
}

Track::~Track ( )
@@ -45,7 +45,7 @@ Track::~Track ( )
/* FIXME: what to do with regions? */
parent()->redraw();
parent()->remove( this );
log_destroy();
// log_destroy();
}

void


+ 11
- 9
Track.H View File

@@ -67,17 +67,19 @@ protected:
sa[0] = (char*)malloc( (_widgets.size() * ((sizeof( int ) * 2) + 3)) + 1 );
sa[1] = NULL;

char *s = sa[0];
sa[0][0] = '\0';

s += sprintf( s, ":items " );
for ( list <Track_Widget *>::const_iterator i = _widgets.begin(); i != _widgets.end(); i++ )
{
s += sprintf( s, "0x%X", ((Loggable*)(*i))->id() );
/* char *s = sa[0]; */

list <Track_Widget *>::const_iterator e = i;
if ( ++e != _widgets.end() )
s += sprintf( s, "," );
}
/* s += sprintf( s, ":items " ); */
/* for ( list <Track_Widget *>::const_iterator i = _widgets.begin(); i != _widgets.end(); i++ ) */
/* { */
/* s += sprintf( s, "0x%X", ((Loggable*)(*i))->id() ); */

/* list <Track_Widget *>::const_iterator e = i; */
/* if ( ++e != _widgets.end() ) */
/* s += sprintf( s, "," ); */
/* } */

return sa;
}


Loading…
Cancel
Save