Update of /cvsroot/audacity/audacity-src/src In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv9207
Modified Files: Menus.cpp Menus.h Log Message: Improving Automatic Volume: - adding enable/disable to transport menu. Suggested by Gale. - Fixing validation problem with "Within" slider. Index: Menus.h =================================================================== RCS file: /cvsroot/audacity/audacity-src/src/Menus.h,v retrieving revision 1.141 retrieving revision 1.142 diff -u -d -r1.141 -r1.142 --- Menus.h 29 Jul 2009 00:26:32 -0000 1.141 +++ Menus.h 13 Aug 2009 16:08:54 -0000 1.142 @@ -274,6 +274,9 @@ void OnToggleSoundActivated(); void OnTogglePlayRecording(); void OnToggleSWPlaythrough(); +#ifdef AUTOMATIC_VOLUME + void OnToogleAutomaticVolume(); +#endif // Tracks Menu Index: Menus.cpp =================================================================== RCS file: /cvsroot/audacity/audacity-src/src/Menus.cpp,v retrieving revision 1.514 retrieving revision 1.515 diff -u -d -r1.514 -r1.515 --- Menus.cpp 9 Aug 2009 02:57:27 -0000 1.514 +++ Menus.cpp 13 Aug 2009 16:08:52 -0000 1.515 @@ -601,6 +601,10 @@ c->AddCheck(wxT("SoundActivation"), _("Sound Activated Recording (on/off)"), FN(OnToggleSoundActivated), 0); c->AddItem(wxT("SoundActivationLevel"), _("Sound Activation Level..."), FN(OnSoundActivated)); +#ifdef AUTOMATIC_VOLUME + c->AddCheck(wxT("AutomaticVolumeOnOff"), _("Automatic Volume (on/off)"), FN(OnToogleAutomaticVolume), 0); +#endif + if (!mCleanSpeechMode) { ////////////////////////////////////////////////////////////////////////// @@ -1484,6 +1488,10 @@ bool active; gPrefs->Read(wxT("/AudioIO/SoundActivatedRecord"),&active, false); mCommandManager.Check(wxT("SoundActivation"), active); +#ifdef AUTOMATIC_VOLUME + gPrefs->Read(wxT("/AudioIO/AutomaticVolumeRecord"),&active, false); + mCommandManager.Check(wxT("AutomaticVolumeOnOff"), active); +#endif gPrefs->Read(wxT("/AudioIO/Duplex"),&active, true); mCommandManager.Check(wxT("Duplex"), active); gPrefs->Read(wxT("/AudioIO/SWPlaythrough"),&active, false); @@ -1822,6 +1830,16 @@ ModifyToolbarMenus(); } +#ifdef AUTOMATIC_VOLUME +void AudacityProject::OnToogleAutomaticVolume() +{ + bool AVEnabled; + gPrefs->Read(wxT("/AudioIO/AutomaticVolumeRecord"), &AVEnabled, false); + gPrefs->Write(wxT("/AudioIO/AutomaticVolumeRecord"), !AVEnabled); + ModifyToolbarMenus(); +} +#endif + double AudacityProject::GetTime(Track *t) { double stime = 0.0; ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ Audacity-cvs mailing list Audacity-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/audacity-cvs