From d7077cda19eb5791d981e393927404f9b46483ab Mon Sep 17 00:00:00 2001 From: Jonathan Moore Liles Date: Sun, 22 Jun 2008 20:03:22 -0500 Subject: [PATCH] Add normalize and remove to region menu. --- Timeline/Audio_Region.C | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/Timeline/Audio_Region.C b/Timeline/Audio_Region.C index 81b6cca..47aabf6 100644 --- a/Timeline/Audio_Region.C +++ b/Timeline/Audio_Region.C @@ -261,6 +261,10 @@ Audio_Region::menu_cb ( const Fl_Menu_ *m ) } else if ( ! strcmp( picked, "/Clear loop point" ) ) _loop = 0; + else if ( ! strcmp( picked, "/Normalize" ) ) + normalize(); + else if ( ! strcmp( picked, "/Remove" ) ) + remove(); else FATAL( "Unknown menu choice \"%s\"", picked ); @@ -300,6 +304,8 @@ Audio_Region::menu ( void ) { "Fade out to mouse", FL_F + 4, 0, 0 }, { "Loop point to mouse", 'l', 0, 0 }, { "Clear loop point", FL_SHIFT + 'l', 0, 0 }, + { "Normalize", 'n', 0, 0 }, + { "Remove", 0, 0, 0 }, { 0 }, }; @@ -647,9 +653,6 @@ Audio_Region::handle ( int m ) if ( test_press( FL_BUTTON2 | FL_CTRL ) ) { normalize(); - /* FIXME: wrong place for this? */ - sequence()->handle_widget_change( start(), length() ); - redraw(); return 1; } else if ( test_press( FL_BUTTON3 ) ) @@ -729,4 +732,8 @@ Audio_Region::normalize ( void ) if ( _clip->read_peaks( length(), offset(), offset() + length(), &peaks, &pbuf, &channels ) && peaks ) _scale = pbuf->normalization_factor(); + + /* FIXME: wrong place for this? */ + sequence()->handle_widget_change( start(), length() ); + redraw(); }