Update of /cvsroot/audacity/audacity-src/src In directory sc8-pr-cvs11.sourceforge.net:/tmp/cvs-serv1175
Modified Files: AudioIO.cpp Menus.cpp Menus.h Log Message: Adding the new 'Transport' menu. Index: Menus.h =================================================================== RCS file: /cvsroot/audacity/audacity-src/src/Menus.h,v retrieving revision 1.121 retrieving revision 1.122 diff -u -d -r1.121 -r1.122 --- Menus.h 12 Jun 2008 12:41:29 -0000 1.121 +++ Menus.h 22 Jun 2008 21:58:52 -0000 1.122 @@ -240,8 +240,14 @@ void OnResetToolBars(); void OnSimplifiedView(); + // Transport Menu - // Project Menu +void OnSoundActivated(); +void OnToggleSoundActivated(); +void OnTogglePlayRecording(); +void OnToggleSWPlaythrough(); + + // Tracks Menu void OnImport(); void OnImportLabels(); @@ -270,7 +276,7 @@ void OnNewStereoTrack(); void OnNewLabelTrack(); void OnNewTimeTrack(); -void OnSmartRecord(); +void OnTimerRecord(); void OnRemoveTracks(); void OnAddLabel(); void OnAddLabelPlaying(); Index: AudioIO.cpp =================================================================== RCS file: /cvsroot/audacity/audacity-src/src/AudioIO.cpp,v retrieving revision 1.185 retrieving revision 1.186 diff -u -d -r1.185 -r1.186 --- AudioIO.cpp 11 Jun 2008 20:11:28 -0000 1.185 +++ AudioIO.cpp 22 Jun 2008 21:58:52 -0000 1.186 @@ -838,7 +838,7 @@ gPrefs->Read(wxT("/AudioIO/SWPlaythrough"), &mSoftwarePlaythrough, false); #ifdef EXPERIMENTAL_SMART_RECORD - gPrefs->Read(wxT("/AudioIO/PauseRecOnSilence"), &mPauseRec, false); + gPrefs->Read(wxT("/AudioIO/SoundActivatedRecord"), &mPauseRec, false); int silenceLevelDB; gPrefs->Read(wxT("/AudioIO/SilenceLevel"), &silenceLevelDB, -50); int dBRange; Index: Menus.cpp =================================================================== RCS file: /cvsroot/audacity/audacity-src/src/Menus.cpp,v retrieving revision 1.381 retrieving revision 1.382 diff -u -d -r1.381 -r1.382 --- Menus.cpp 22 Jun 2008 02:46:33 -0000 1.381 +++ Menus.cpp 22 Jun 2008 21:58:52 -0000 1.382 @@ -86,7 +86,8 @@ #include "PlatformCompatibility.h" #include "FileNames.h" #include "TimeDialog.h" -#include "SmartRecordDialog.h" +#include "TimerRecordDialog.h" +#include "SoundActivatedRecord.h" #include "LabelDialog.h" #include "FileDialog.h" @@ -553,6 +554,42 @@ c->EndMenu(); // + // Transport Menu + // + + /*i18n-hint: 'Transport' is the name given to the set of controls that + play, record, pause etc. */ + c->BeginMenu(_("T&ransport")); + c->SetDefaultFlags(0, 0); + c->AddItem(wxT("Play"), _("Play\tSpacebar"), FN(OnPlayStop)); + c->SetCommandFlags(wxT("Play"), AudioIONotBusyFlag, AudioIONotBusyFlag); + c->AddItem(wxT("PlayLooped"), _("&Loop Play\tShift+Spacebar"), FN(OnPlayLooped)); + c->SetCommandFlags(wxT("PlayLooped"), AudioIONotBusyFlag, AudioIONotBusyFlag); + c->AddItem(wxT("Pause"), _("&Pause\tP"), FN(OnPause)); + c->AddItem(wxT("Stop"), _("&Stop\tSpacebar"), FN(OnStop)); + c->AddItem(wxT("SkipStart"), _("Skip to Start\tHome"), FN(OnSkipStart)); + c->SetCommandFlags(wxT("SkipStart"), AudioIONotBusyFlag, AudioIONotBusyFlag); + c->AddItem(wxT("SkipEnd"), _("Skip to End\tEnd"), FN(OnSkipEnd)); + c->SetCommandFlags(wxT("SkipEnd"), AudioIONotBusyFlag, AudioIONotBusyFlag); + c->AddSeparator(); + c->AddItem(wxT("Record"), _("&Record\tR"), FN(OnRecord)); + c->SetCommandFlags(wxT("Record"), AudioIONotBusyFlag, AudioIONotBusyFlag); + c->AddItem(wxT("TimerRecord"), _("&Timer Record..."), FN(OnTimerRecord)); + c->SetCommandFlags(wxT("TimerRecord"), AudioIONotBusyFlag, AudioIONotBusyFlag); + c->AddItem(wxT("RecordAppend"), _("Append Record\tShift+R"), FN(OnRecordAppend)); + c->SetCommandFlags(wxT("RecordAppend"), AudioIONotBusyFlag, AudioIONotBusyFlag); + c->AddSeparator(); + c->AddItem(wxT("Duplex"), _("Play While Recording (on/off)"), FN(OnTogglePlayRecording), 0); + c->SetCommandFlags(wxT("Duplex"), AudioIONotBusyFlag, AudioIONotBusyFlag); + c->AddItem(wxT("SWPlaythrough"), _("Software Playthrough (on/off)"), FN(OnToggleSWPlaythrough), 0); + c->SetCommandFlags(wxT("SWPlaythrough"), AudioIONotBusyFlag, AudioIONotBusyFlag); + // Sound Activated recording options + c->AddItem(wxT("SoundActivation"), _("Sound Activated Recording (on/off)"), FN(OnToggleSoundActivated), 0); + c->SetCommandFlags(wxT("SoundActivation"), AudioIONotBusyFlag, AudioIONotBusyFlag); + c->AddItem(wxT("SoundActivationLevel"), _("Sound Activation Level..."), FN(OnSoundActivated)); + c->SetCommandFlags(wxT("SoundActivationLevel"), AudioIONotBusyFlag, AudioIONotBusyFlag); + + // // Tracks Menu (formerly Project Menu) // if( !mCleanSpeechMode ) @@ -571,8 +608,6 @@ c->AddItem(wxT("NewTimeTrack"), _("&Time Track"), FN(OnNewTimeTrack)); c->EndSubMenu(); - c->AddItem(wxT("SmartRecord"), _("&Timer Record..."), FN(OnSmartRecord)); - c->AddSeparator(); // StereoToMono moves to the Edit menu when in CleanSpeech mode. // It belongs here normally, because it is a kind of mix-down. @@ -1276,6 +1311,13 @@ mToolManager->IsVisible(ToolsBarID)); mCommandManager.Check(wxT("ShowTranscriptionTB"), mToolManager->IsVisible(TranscriptionBarID)); + bool active; + gPrefs->Read(wxT("/AudioIO/SoundActivatedRecord"),&active, false); + mCommandManager.Check(wxT("SoundActivation"), active); + gPrefs->Read(wxT("/AudioIO/Duplex"),&active, false); + mCommandManager.Check(wxT("Duplex"), active); + gPrefs->Read(wxT("/AudioIO/SWPlaythrough"),&active, false); + mCommandManager.Check(wxT("SWPlaythrough"), active); } void AudacityProject::UpdateMenus() @@ -1591,6 +1633,30 @@ ModifyState(); } +void AudacityProject::OnToggleSoundActivated() +{ + bool pause; + gPrefs->Read(wxT("/AudioIO/SoundActivatedRecord"), &pause, false); + gPrefs->Write(wxT("/AudioIO/SoundActivatedRecord"), !pause); + ModifyToolbarMenus(); +} + +void AudacityProject::OnTogglePlayRecording() +{ + bool Duplex; + gPrefs->Read(wxT("/AudioIO/Duplex"), &Duplex, false); + gPrefs->Write(wxT("/AudioIO/Duplex"), !Duplex); + ModifyToolbarMenus(); +} + +void AudacityProject::OnToggleSWPlaythrough() +{ + bool SWPlaythrough; + gPrefs->Read(wxT("/AudioIO/SWPlaythrough"), &SWPlaythrough, false); + gPrefs->Write(wxT("/AudioIO/SWPlaythrough"), !SWPlaythrough); + ModifyToolbarMenus(); +} + double AudacityProject::GetTime(Track *t) { double stime = 0.0; @@ -4139,9 +4205,15 @@ mTrackPanel->EnsureVisible(t); } -void AudacityProject::OnSmartRecord() +void AudacityProject::OnTimerRecord() { - SmartRecordDialog dialog(this /* parent */ ); + TimerRecordDialog dialog(this /* parent */ ); + dialog.ShowModal(); +} + +void AudacityProject::OnSoundActivated() +{ + SoundActivatedRecord dialog(this /* parent */ ); dialog.ShowModal(); } ------------------------------------------------------------------------- Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php _______________________________________________ Audacity-cvs mailing list Audacity-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/audacity-cvs