diff --git a/Timeline/Audio_Sequence.H b/Timeline/Audio_Sequence.H index e1c661f..d8e2df1 100644 --- a/Timeline/Audio_Sequence.H +++ b/Timeline/Audio_Sequence.H @@ -105,6 +105,8 @@ public: void dump ( void ); void remove_selected ( void ); + const Region *capture ( void ) const { return track()->capture(); } + nframes_t play ( sample_t *buf, nframes_t frame, nframes_t nframes, int channels ); }; diff --git a/Timeline/Region.C b/Timeline/Region.C index 823ec18..8531a93 100644 --- a/Timeline/Region.C +++ b/Timeline/Region.C @@ -22,6 +22,8 @@ #include "Timeline.H" #include "Waveform.H" +#include "Audio_Sequence.H" + #include "dsp.h" #include @@ -548,12 +550,14 @@ Region::draw_box( void ) fl_push_clip( x(), y(), w(), h() ); - int active = active_r(); - Fl_Color selection_color = _selection_color; Fl_Color color = _box_color; - if ( ! active_r() ) + if ( this == ((Audio_Sequence*)track())->capture() ) + { + color = FL_RED; + } + else if ( ! active_r() ) { color = fl_inactive( color ); selection_color = fl_inactive( selection_color ); @@ -561,7 +565,6 @@ Region::draw_box( void ) if ( selected() ) fl_draw_box( fl_down( box() ), x() - 10, y(), w() + 50, h(), selection_color ); -// fl_draw_box( fl_down( box() ), x() - 10, Y, w() + 50, H, fl_invert_color( _box_color ) ); else fl_draw_box( box(), x() - 10, y(), w() + 50, h(), color ); diff --git a/Timeline/Track.H b/Timeline/Track.H index ab3e103..1dfb55a 100644 --- a/Timeline/Track.H +++ b/Timeline/Track.H @@ -229,6 +229,9 @@ public: void draw ( void ); int handle ( int m ); + + const Region *capture ( void ) const { return _capture; } + /* Engine */ nframes_t process ( nframes_t nframes ); void seek ( nframes_t frame );