Symbol name cleanup.
This commit is contained in:
parent
9d498d7eca
commit
a57db305f2
|
@ -78,7 +78,7 @@ Audio_Sequence::set ( Log_Entry &e )
|
||||||
|
|
||||||
assert( t );
|
assert( t );
|
||||||
|
|
||||||
t->track( this );
|
t->sequence( this );
|
||||||
}
|
}
|
||||||
else if ( ! strcmp( ":name", s ) )
|
else if ( ! strcmp( ":name", s ) )
|
||||||
name( v );
|
name( v );
|
||||||
|
|
|
@ -50,7 +50,7 @@ float Disk_Stream::seconds_to_buffer = 2.0f;
|
||||||
counts.*/
|
counts.*/
|
||||||
size_t Disk_Stream::disk_io_kbytes = 256;
|
size_t Disk_Stream::disk_io_kbytes = 256;
|
||||||
|
|
||||||
Disk_Stream::Disk_Stream ( Track *th, float frame_rate, nframes_t nframes, int channels ) : _th( th )
|
Disk_Stream::Disk_Stream ( Track *track, float frame_rate, nframes_t nframes, int channels ) : _track( track )
|
||||||
{
|
{
|
||||||
|
|
||||||
assert( channels );
|
assert( channels );
|
||||||
|
@ -83,7 +83,7 @@ Disk_Stream::~Disk_Stream ( )
|
||||||
/* it isn't safe to do all this with the RT thread running */
|
/* it isn't safe to do all this with the RT thread running */
|
||||||
engine->lock();
|
engine->lock();
|
||||||
|
|
||||||
_th = NULL;
|
_track = NULL;
|
||||||
|
|
||||||
sem_destroy( &_blocks );
|
sem_destroy( &_blocks );
|
||||||
|
|
||||||
|
@ -148,10 +148,16 @@ Disk_Stream::shutdown ( void )
|
||||||
_terminate = false;
|
_terminate = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
Audio_Sequence *
|
Track *
|
||||||
Disk_Stream::track ( void )
|
Disk_Stream::track ( void ) const
|
||||||
{
|
{
|
||||||
return (Audio_Sequence*)_th->track();
|
return _track;
|
||||||
|
}
|
||||||
|
|
||||||
|
Audio_Sequence *
|
||||||
|
Disk_Stream::sequence ( void ) const
|
||||||
|
{
|
||||||
|
return (Audio_Sequence*)_track->sequence();
|
||||||
}
|
}
|
||||||
|
|
||||||
/** start Disk_Stream thread */
|
/** start Disk_Stream thread */
|
||||||
|
|
|
@ -42,7 +42,7 @@ protected:
|
||||||
|
|
||||||
pthread_t _thread; /* io thread */
|
pthread_t _thread; /* io thread */
|
||||||
|
|
||||||
Track *_th; /* Track we belong to */
|
Track *_track; /* Track we belong to */
|
||||||
|
|
||||||
nframes_t _nframes; /* buffer size */
|
nframes_t _nframes; /* buffer size */
|
||||||
|
|
||||||
|
@ -62,7 +62,8 @@ protected:
|
||||||
|
|
||||||
int channels ( void ) const { return _rb.size(); }
|
int channels ( void ) const { return _rb.size(); }
|
||||||
|
|
||||||
Audio_Sequence * track ( void );
|
Audio_Sequence * sequence ( void ) const;
|
||||||
|
Track * track ( void ) const;
|
||||||
|
|
||||||
static void *disk_thread ( void *arg );
|
static void *disk_thread ( void *arg );
|
||||||
|
|
||||||
|
|
|
@ -71,7 +71,7 @@ Playback_DS::read_block ( sample_t *buf, nframes_t nframes )
|
||||||
|
|
||||||
// printf( "IO: attempting to read block @ %lu\n", _frame );
|
// printf( "IO: attempting to read block @ %lu\n", _frame );
|
||||||
|
|
||||||
if ( ! track() )
|
if ( ! sequence() )
|
||||||
{
|
{
|
||||||
// _frame += _nframes;
|
// _frame += _nframes;
|
||||||
return;
|
return;
|
||||||
|
@ -79,7 +79,7 @@ Playback_DS::read_block ( sample_t *buf, nframes_t nframes )
|
||||||
|
|
||||||
timeline->rdlock();
|
timeline->rdlock();
|
||||||
|
|
||||||
if ( track()->play( buf, _frame, nframes, channels() ) )
|
if ( sequence()->play( buf, _frame, nframes, channels() ) )
|
||||||
_frame += nframes;
|
_frame += nframes;
|
||||||
else
|
else
|
||||||
/* error */;
|
/* error */;
|
||||||
|
@ -213,7 +213,7 @@ Playback_DS::process ( nframes_t nframes )
|
||||||
for ( int i = channels(); i--; )
|
for ( int i = channels(); i--; )
|
||||||
{
|
{
|
||||||
|
|
||||||
void *buf = _th->output[ i ].buffer( nframes );
|
void *buf = track()->output[ i ].buffer( nframes );
|
||||||
|
|
||||||
if ( jack_ringbuffer_read( _rb[ i ], (char*)buf, block_size ) < block_size )
|
if ( jack_ringbuffer_read( _rb[ i ], (char*)buf, block_size ) < block_size )
|
||||||
{
|
{
|
||||||
|
@ -223,7 +223,7 @@ Playback_DS::process ( nframes_t nframes )
|
||||||
}
|
}
|
||||||
|
|
||||||
/* TODO: figure out a way to stop IO while muted without losing sync */
|
/* TODO: figure out a way to stop IO while muted without losing sync */
|
||||||
if ( _th->mute() || ( Track::soloing() && ! _th->solo() ) )
|
if ( track()->mute() || ( Track::soloing() && ! track()->solo() ) )
|
||||||
buffer_fill_with_silence( (sample_t*)buf, nframes );
|
buffer_fill_with_silence( (sample_t*)buf, nframes );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -38,12 +38,12 @@ Record_DS::write_block ( sample_t *buf, nframes_t nframes )
|
||||||
{
|
{
|
||||||
|
|
||||||
/* stupid chicken/egg */
|
/* stupid chicken/egg */
|
||||||
if ( ! ( timeline && track() ) )
|
if ( ! ( timeline && sequence() ) )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// timeline->wrlock();
|
// timeline->wrlock();
|
||||||
|
|
||||||
_th->write( buf, nframes );
|
track()->write( buf, nframes );
|
||||||
|
|
||||||
_frames_written += nframes;
|
_frames_written += nframes;
|
||||||
|
|
||||||
|
@ -201,7 +201,7 @@ Record_DS::start ( nframes_t frame )
|
||||||
|
|
||||||
_frame = frame;
|
_frame = frame;
|
||||||
|
|
||||||
_th->record( frame );
|
track()->record( frame );
|
||||||
|
|
||||||
run();
|
run();
|
||||||
|
|
||||||
|
@ -231,7 +231,7 @@ Record_DS::stop ( nframes_t frame )
|
||||||
|
|
||||||
/* FIXME: flush buffers here? */
|
/* FIXME: flush buffers here? */
|
||||||
|
|
||||||
_th->stop( frame );
|
track()->stop( frame );
|
||||||
|
|
||||||
DMESSAGE( "recording finished" );
|
DMESSAGE( "recording finished" );
|
||||||
}
|
}
|
||||||
|
@ -252,7 +252,7 @@ Record_DS::process ( nframes_t nframes )
|
||||||
|
|
||||||
for ( int i = channels(); i--; )
|
for ( int i = channels(); i--; )
|
||||||
{
|
{
|
||||||
void *buf = _th->input[ i ].buffer( nframes );
|
void *buf = track()->input[ i ].buffer( nframes );
|
||||||
|
|
||||||
if ( jack_ringbuffer_write( _rb[ i ], (char*)buf, block_size ) < block_size )
|
if ( jack_ringbuffer_write( _rb[ i ], (char*)buf, block_size ) < block_size )
|
||||||
{
|
{
|
||||||
|
|
|
@ -929,7 +929,7 @@ Timeline::handle ( int m )
|
||||||
|
|
||||||
add_track( t );
|
add_track( t );
|
||||||
|
|
||||||
t->track( o );
|
t->sequence( o );
|
||||||
|
|
||||||
Loggable::block_end();
|
Loggable::block_end();
|
||||||
}
|
}
|
||||||
|
|
|
@ -93,7 +93,7 @@ Track::cb_button ( Fl_Widget *w )
|
||||||
show_all_takes( take_menu->menu()[ v ].value() );
|
show_all_takes( take_menu->menu()[ v ].value() );
|
||||||
return;
|
return;
|
||||||
case 1: /* new */
|
case 1: /* new */
|
||||||
track( (Audio_Sequence*)track()->clone_empty() );
|
sequence( (Audio_Sequence*)sequence()->clone_empty() );
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -104,7 +104,7 @@ Track::cb_button ( Fl_Widget *w )
|
||||||
Audio_Sequence *t = (Audio_Sequence*)takes->child( i );
|
Audio_Sequence *t = (Audio_Sequence*)takes->child( i );
|
||||||
if ( ! strcmp( s, t->name() ) )
|
if ( ! strcmp( s, t->name() ) )
|
||||||
{
|
{
|
||||||
track( t );
|
sequence( t );
|
||||||
redraw();
|
redraw();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -116,7 +116,7 @@ void
|
||||||
Track::init ( void )
|
Track::init ( void )
|
||||||
{
|
{
|
||||||
_capture = NULL;
|
_capture = NULL;
|
||||||
_track = NULL;
|
_sequence = NULL;
|
||||||
_name = NULL;
|
_name = NULL;
|
||||||
_selected = false;
|
_selected = false;
|
||||||
_show_all_takes = false;
|
_show_all_takes = false;
|
||||||
|
@ -312,8 +312,8 @@ Track::resize ( void )
|
||||||
|
|
||||||
Fl_Group::size( w(), h() + ( ( 24 ) * pack_visible( annotation ) ) );
|
Fl_Group::size( w(), h() + ( ( 24 ) * pack_visible( annotation ) ) );
|
||||||
|
|
||||||
if ( track() )
|
if ( sequence() )
|
||||||
track()->size( w(), height() );
|
sequence()->size( w(), height() );
|
||||||
|
|
||||||
|
|
||||||
if ( controls->y() + controls->h() > y() + h() )
|
if ( controls->y() + controls->h() > y() + h() )
|
||||||
|
@ -373,14 +373,14 @@ Track::remove ( Control_Sequence *t )
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
Track::track ( Audio_Sequence * t )
|
Track::sequence ( Audio_Sequence * t )
|
||||||
{
|
{
|
||||||
t->track( this );
|
t->track( this );
|
||||||
|
|
||||||
if ( track() )
|
if ( sequence() )
|
||||||
add( track() );
|
add( sequence() );
|
||||||
|
|
||||||
_track = t;
|
_sequence = t;
|
||||||
pack->insert( *t, 1 );
|
pack->insert( *t, 1 );
|
||||||
|
|
||||||
t->labeltype( FL_NO_LABEL );
|
t->labeltype( FL_NO_LABEL );
|
||||||
|
@ -423,7 +423,7 @@ Track::select ( int X, int Y, int W, int H,
|
||||||
bool include_control, bool merge_control )
|
bool include_control, bool merge_control )
|
||||||
{
|
{
|
||||||
|
|
||||||
Sequence *t = track();
|
Sequence *t = sequence();
|
||||||
|
|
||||||
if ( ! ( t->y() > Y + H || t->y() + t->h() < Y ) )
|
if ( ! ( t->y() > Y + H || t->y() + t->h() < Y ) )
|
||||||
t->select_range( X, W );
|
t->select_range( X, W );
|
||||||
|
@ -786,7 +786,7 @@ Track::record ( nframes_t frame )
|
||||||
/* open it again for reading in the GUI thread */
|
/* open it again for reading in the GUI thread */
|
||||||
Audio_File *af = Audio_File::from_file( _capture_af->name() );
|
Audio_File *af = Audio_File::from_file( _capture_af->name() );
|
||||||
|
|
||||||
_capture = new Audio_Region( af, track(), frame );
|
_capture = new Audio_Region( af, sequence(), frame );
|
||||||
|
|
||||||
_capture->prepare();
|
_capture->prepare();
|
||||||
}
|
}
|
||||||
|
|
|
@ -79,7 +79,7 @@ private:
|
||||||
|
|
||||||
enum { AUDIO } _type;
|
enum { AUDIO } _type;
|
||||||
|
|
||||||
Audio_Sequence *_track;
|
Audio_Sequence *_sequence;
|
||||||
|
|
||||||
Audio_Region *_capture; /* capture region */
|
Audio_Region *_capture; /* capture region */
|
||||||
Audio_File *_capture_af; /* capture write source */
|
Audio_File *_capture_af; /* capture write source */
|
||||||
|
@ -171,7 +171,7 @@ public:
|
||||||
{
|
{
|
||||||
// assert( t );
|
// assert( t );
|
||||||
|
|
||||||
track( t );
|
sequence( t );
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -185,7 +185,7 @@ public:
|
||||||
virtual void get ( Log_Entry &e ) const
|
virtual void get ( Log_Entry &e ) const
|
||||||
{
|
{
|
||||||
e.add( ":name", _name );
|
e.add( ":name", _name );
|
||||||
e.add( ":sequence", track() );
|
e.add( ":sequence", sequence() );
|
||||||
e.add( ":selected", _selected );
|
e.add( ":selected", _selected );
|
||||||
e.add( ":height", size() );
|
e.add( ":height", size() );
|
||||||
e.add( ":inputs", input.size() );
|
e.add( ":inputs", input.size() );
|
||||||
|
@ -251,8 +251,8 @@ public:
|
||||||
|
|
||||||
static int width ( void ) { return 150; }
|
static int width ( void ) { return 150; }
|
||||||
|
|
||||||
void track ( Audio_Sequence * t );
|
void sequence ( Audio_Sequence * t );
|
||||||
Audio_Sequence * track ( void ) const { return _track; }
|
Audio_Sequence * sequence ( void ) const { return _sequence; }
|
||||||
|
|
||||||
void draw ( void );
|
void draw ( void );
|
||||||
int handle ( int m );
|
int handle ( int m );
|
||||||
|
|
Loading…
Reference in New Issue