Update of /cvsroot/audacity/audacity-src/src/toolbars
In directory sc8-pr-cvs11.sourceforge.net:/tmp/cvs-serv22110

Modified Files:
        TranscriptionToolBar.cpp 
Log Message:
Allow Play At Speed button to restart audio
Allow clicking speed slider during play to adjust speed

Index: TranscriptionToolBar.cpp
===================================================================
RCS file: /cvsroot/audacity/audacity-src/src/toolbars/TranscriptionToolBar.cpp,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- TranscriptionToolBar.cpp    25 Apr 2007 03:43:36 -0000      1.8
+++ TranscriptionToolBar.cpp    3 Jun 2007 18:37:12 -0000       1.9
@@ -308,19 +308,18 @@
 
 void TranscriptionToolBar::OnPlaySpeed(wxCommandEvent & event)
 {
+   // Can't do anything without an active project
+   AudacityProject * p = GetActiveProject();
+   if (!p) {
+      return;
+   }
+
    // Pop up the button
    SetButton(false, mButtons[TTB_PlaySpeed]); 
 
    // If IO is busy, abort immediately
    if (gAudioIO->IsBusy()) {
-      SetButton(false, mButtons[TTB_PlaySpeed]);
-      return;
-   }
-
-   // Can't do anything without an active project
-   AudacityProject * p = GetActiveProject();
-   if (!p) {
-      return;
+      p->GetControlToolBar()->StopPlaying();
    }
 
    // Can't do anything without a time track
@@ -349,6 +348,11 @@
 void TranscriptionToolBar::OnSpeedSlider(wxCommandEvent& event)
 {
    mPlaySpeed = (mPlaySpeedSlider->Get()) * 100;
+
+   // If IO is busy, abort immediately
+   if (gAudioIO->IsBusy()) {
+      OnPlaySpeed(event);
+   }
 }
 
 void TranscriptionToolBar::OnStartOn(wxCommandEvent &event)


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Audacity-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/audacity-cvs

Reply via email to