Minor cleanup.

This commit is contained in:
Jonathan Moore Liles 2008-04-15 19:08:48 -05:00
parent 9c2329eb78
commit 424b68f044
2 changed files with 30 additions and 23 deletions

View File

@ -28,7 +28,7 @@
/**********/
/* A Disk_Stream uses a separate I/O thread to stream a track's
regions from disk into a ringbuffer, to be processed by the RT
regions from disk into a ringbuffer to be processed by the RT
thread (or vice-versa). The I/O thread syncronizes access with the
user thread via the Timeline mutex. The size of the buffer (in
seconds) must be set before any Disk_Stream objects are created;
@ -38,7 +38,15 @@
/* FIXME: handle termination of IO thread in destructor */
/* FIXME: deal with (jack) buffer size changes */
/* FIXME: needs error handling everywhere! */
/* TODO: handle capture too */
/* TODO: handle capture too. For this to work with some kind of
* punch-in/out system, I believe we'll have to always keep at least
* one buffer's worth of input. We would need this anyway in order to
* pass input through to output (software monitoring). What about
* looped recording? */
/* TODO: latency compensation? Does this really apply to us? (we're
* not hosting plugins here) */
/* TODO: read/write data from/to disk in larger chunks to avoid
* excessive seeking. 256k is supposedly the sweetspot. */
float Disk_Stream::seconds_to_buffer = 5.0f;
// size_t Disk_Stream::disk_block_frames = 2048;

View File

@ -100,26 +100,24 @@ public:
Fl_Widget::size( w(), height() );
}
else
if ( ! strcmp( s, ":selected" ) )
_selected = atoi( v );
else
if ( ! strcmp( s, ":name" ) )
{
_name = strdup( v );
name_field->value( _name );
}
else
if ( ! strcmp( s, ":track" ) )
{
int i;
sscanf( v, "%X", &i );
Track *t = (Track*)Loggable::find( i );
else if ( ! strcmp( s, ":selected" ) )
_selected = atoi( v );
// else if ( ! strcmp( s, ":armed"
else if ( ! strcmp( s, ":name" ) )
{
_name = strdup( v );
name_field->value( _name );
}
else if ( ! strcmp( s, ":track" ) )
{
int i;
sscanf( v, "%X", &i );
Track *t = (Track*)Loggable::find( i );
assert( t );
assert( t );
track( t );
}
track( t );
}
free( s );
@ -131,14 +129,15 @@ public:
char ** get ( void )
{
char **sa = (char**)malloc( sizeof( char* ) * (1 + 4) );
char **sa = (char**)malloc( sizeof( char* ) * (1 + 5) );
int i = 0;
asprintf( &sa[ i++ ], ":name \"%s\"", _name ? _name : "" );
asprintf( &sa[ i++ ], ":track 0x%X", track() ? track()->id() : 0 );
asprintf( &sa[ i++ ], ":selected %d", _selected );
/* asprintf( &sa[ i++ ], ":record %d", record_button->value() ); */
// asprintf( &sa[ i++ ], ":record %d", record_button->value() );
/* asprintf( &sa[ i++ ], ":solo %d", solo_button->value() ); */
/* asprintf( &sa[ i++ ], ":mute %d", mute_button->value() ); */
asprintf( &sa[ i++ ], ":h %d", size() );
@ -203,7 +202,7 @@ public:
const char * name ( void ) const { return _name; }
bool mute ( void ) const { return mute_button->value(); }
bool solo ( void ) const { return solo_button->value(); }
bool arm ( void ) const { return record_button->value(); }
bool armed ( void ) const { return record_button->value(); }
bool selected ( void ) const { return _selected; }
static void cb_input_field ( Fl_Widget *w, void *v );