Update of /cvsroot/audacity/audacity-src/src
In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv5830

Modified Files:
      Tag: Audacity_UmixIt
        AudioIO.cpp ControlToolBar.cpp Menus.cpp Project.cpp 
        TrackPanel.cpp Audacity.h AudioIO.h Menus.h 
Log Message:
For Audiotouch custom version: Add "Append Recording" toggle. 

Index: Audacity.h
===================================================================
RCS file: /cvsroot/audacity/audacity-src/src/Audacity.h,v
retrieving revision 1.20.2.17.2.10
retrieving revision 1.20.2.17.2.11
diff -u -d -r1.20.2.17.2.10 -r1.20.2.17.2.11
--- Audacity.h  2 Jul 2009 22:40:38 -0000       1.20.2.17.2.10
+++ Audacity.h  8 Sep 2009 00:18:27 -0000       1.20.2.17.2.11
@@ -20,7 +20,7 @@
 
 // Increment this every time you release a new version
 #if (AUDACITY_BRANDING == BRAND_AUDIOTOUCH)
-   #define AUDACITY_VERSION_STRING "1.2.6a7"
+   #define AUDACITY_VERSION_STRING "1.2.6a8"
 #elif (AUDACITY_BRANDING == BRAND_UMIXIT)
    #define AUDACITY_VERSION_STRING "1.2.6.1"
 #else

Index: AudioIO.h
===================================================================
RCS file: /cvsroot/audacity/audacity-src/src/AudioIO.h,v
retrieving revision 1.33.2.6
retrieving revision 1.33.2.6.2.1
diff -u -d -r1.33.2.6 -r1.33.2.6.2.1
--- AudioIO.h   23 Mar 2006 09:01:15 -0000      1.33.2.6
+++ AudioIO.h   8 Sep 2009 00:18:27 -0000       1.33.2.6.2.1
@@ -134,6 +134,8 @@
    sampleFormat GetCaptureFormat() { return mCaptureFormat; }
    int GetNumCaptureChannels() { return mNumCaptureChannels; }
 
+   void SetWantLatencyCorrection(const bool bWant) { mWantLatencyCorrection = 
bWant; };
+
 private:
 
    bool StartPortAudioStream(double sampleRate,
@@ -181,6 +183,8 @@
    bool                mNoModifyDevice;
 #endif
    double              mLastRecordingOffset;
+   bool                mWantLatencyCorrection;
+
    unsigned int        mNumCaptureChannels;
    unsigned int        mNumPlaybackChannels;
    sampleFormat        mCaptureFormat;

Index: ControlToolBar.cpp
===================================================================
RCS file: /cvsroot/audacity/audacity-src/src/Attic/ControlToolBar.cpp,v
retrieving revision 1.61.2.14.2.11
retrieving revision 1.61.2.14.2.12
diff -u -d -r1.61.2.14.2.11 -r1.61.2.14.2.12
--- ControlToolBar.cpp  29 Mar 2009 06:52:45 -0000      1.61.2.14.2.11
+++ ControlToolBar.cpp  8 Sep 2009 00:18:26 -0000       1.61.2.14.2.12
@@ -1145,7 +1145,7 @@
          }
          else
          {
-            //vvv evt.GetClassInfo();
+            //v evt.GetClassInfo();
          }
       #else
          mRecord->PopUp();
@@ -1192,6 +1192,14 @@
       double t1 = p->GetSel1();
       if (t1 == t0)
          t1 = 1000000000.0;     // record for a long, long time (tens of years)
+      #if (AUDACITY_BRANDING == BRAND_AUDIOTOUCH)
+         if (p->m_bWantAppendRecording)
+         {
+            t0 = t->GetEndTime();
+            t1 = 1000000000.0;     // record for a long, long time (tens of 
years)
+         }
+         gAudioIO->SetWantLatencyCorrection(!p->m_bWantAppendRecording);
+      #endif
 
       /* TODO: set up stereo tracks if that is how the user has set up
        * their preferences, and choose sample format based on prefs */

Index: AudioIO.cpp
===================================================================
RCS file: /cvsroot/audacity/audacity-src/src/AudioIO.cpp,v
retrieving revision 1.100.2.27.2.2
retrieving revision 1.100.2.27.2.3
diff -u -d -r1.100.2.27.2.2 -r1.100.2.27.2.3
--- AudioIO.cpp 26 Feb 2007 09:36:22 -0000      1.100.2.27.2.2
+++ AudioIO.cpp 8 Sep 2009 00:18:25 -0000       1.100.2.27.2.3
@@ -143,6 +143,7 @@
 
 AudioIO::AudioIO()
 {
+   mWantLatencyCorrection = true;
    mAudioThreadShouldCallFillBuffersOnce = false;
    mAudioThreadFillBuffersLoopRunning = false;
 #if USE_PORTAUDIO_V19
@@ -996,11 +997,12 @@
       if( mCaptureTracks.GetCount() > 0 )
       {
          for( unsigned int i = 0; i < mCaptureTracks.GetCount(); i++ )
-            {
-               delete mCaptureBuffers[i];
-               mCaptureTracks[i]->Flush();
+         {
+            delete mCaptureBuffers[i];
+            mCaptureTracks[i]->Flush();
+            if (mWantLatencyCorrection)
                mCaptureTracks[i]->Offset(mLastRecordingOffset);
-            }
+         }
          
          delete[] mCaptureBuffers;
       }

Index: TrackPanel.cpp
===================================================================
RCS file: /cvsroot/audacity/audacity-src/src/TrackPanel.cpp,v
retrieving revision 1.212.2.15.2.21
retrieving revision 1.212.2.15.2.22
diff -u -d -r1.212.2.15.2.21 -r1.212.2.15.2.22
--- TrackPanel.cpp      18 Mar 2009 22:44:16 -0000      1.212.2.15.2.21
+++ TrackPanel.cpp      8 Sep 2009 00:18:27 -0000       1.212.2.15.2.22
@@ -4576,20 +4576,19 @@
    return OnFloatID;// Compiler food.
 }
 
-/// Puts a check mark at a given position in a menu, clearing all other check 
marks.
+// Puts a check mark at a given position in a menu, clearing all other check 
marks.
 void TrackPanel::SetMenuCheck( wxMenu & menu, int newId )
 {
    wxMenuItemList & list = menu.GetMenuItems();
    wxMenuItem * item;
    int id;
 
-   for ( wxwxMenuItemListNode * node = list.GetFirst(); node; node = 
node->GetNext() )
+   for (wxwxMenuItemListNode* node = list.GetFirst(); node; node = 
node->GetNext())
    {
       item = node->GetData();
       id = item->GetId();
       menu.Check( id, id==newId );
    }
-
 }
 
 

Index: Menus.cpp
===================================================================
RCS file: /cvsroot/audacity/audacity-src/src/Menus.cpp,v
retrieving revision 1.151.2.26.2.18
retrieving revision 1.151.2.26.2.19
diff -u -d -r1.151.2.26.2.18 -r1.151.2.26.2.19
--- Menus.cpp   29 Mar 2009 06:52:45 -0000      1.151.2.26.2.18
+++ Menus.cpp   8 Sep 2009 00:18:26 -0000       1.151.2.26.2.19
@@ -403,14 +403,16 @@
 
 #if (AUDACITY_BRANDING == BRAND_AUDIOTOUCH)
    //
-   // Play Menu
+   // Transport Menu
    //
 
-   c->BeginMenu(_("&Play"));
+   c->BeginMenu(_("&Transport"));
    c->SetDefaultFlags(0, 0);
    // Start with "Do Not" versions because default for both is TRUE.
    c->AddItem("PlayAfterOpen", _("Do Not Play after File Open\tCtrl+Shift+O"), 
 FN(OnPlayAfterOpen));
    c->AddItem("PlayAfterRecord", _("Do Not Play after Record\tCtrl+Shift+R"),  
FN(OnPlayAfterRecord));
+   c->AddSeparator();
+   c->AddItem("AppendRecording", _("Do Not Append Recording"),  
FN(OnAppendRecording));
    c->EndMenu();
 #endif
 
@@ -3510,7 +3512,8 @@
    }
 
 #elif (AUDACITY_BRANDING == BRAND_AUDIOTOUCH)
-   // Play menu
+   // Transport menu
+
    void AudacityProject::OnPlayAfterOpen()
    {
       m_bWantPlayAfterOpen = !m_bWantPlayAfterOpen;
@@ -3531,7 +3534,18 @@
             _("Play after Record\tCtrl+Shift+R"));
    }
 
+   void AudacityProject::OnAppendRecording()
+   {
+      m_bWantAppendRecording = !m_bWantAppendRecording;
+      mCommandManager.Modify(
+         "AppendRecording", 
+         m_bWantAppendRecording ? 
+            _("Do Not Append Recording") : 
+            _("Append Recording"));
+   }
+
    // Help menu
+   
    #include "AudacityApp.h"
 
    void LinkToPathlistHTM(const wxString strHTMfilename) 
@@ -3565,7 +3579,7 @@
    {
       LinkToPathlistHTM(FROMFILENAME("Audacity_Audiotouch-download.htm"));
    }
-#endif
+#endif // (AUDACITY_BRANDING == BRAND_AUDIOTOUCH)
 
 //
 

Index: Project.cpp
===================================================================
RCS file: /cvsroot/audacity/audacity-src/src/Project.cpp,v
retrieving revision 1.178.2.17.2.31
retrieving revision 1.178.2.17.2.32
diff -u -d -r1.178.2.17.2.31 -r1.178.2.17.2.32
--- Project.cpp 29 Jan 2009 05:41:04 -0000      1.178.2.17.2.31
+++ Project.cpp 8 Sep 2009 00:18:26 -0000       1.178.2.17.2.32
@@ -399,6 +399,7 @@
      #if (AUDACITY_BRANDING == BRAND_AUDIOTOUCH)
         m_bWantPlayAfterOpen(true),
         m_bWantPlayAfterRecord(true),
+        m_bWantAppendRecording(true),
      #elif (AUDACITY_BRANDING != BRAND_THINKLABS) // && (AUDACITY_BRANDING != 
BRAND_AUDIOTOUCH)
         mLyricsWindow(NULL),
         mMixerBoard(NULL),

Index: Menus.h
===================================================================
RCS file: /cvsroot/audacity/audacity-src/src/Menus.h,v
retrieving revision 1.53.2.4.2.11
retrieving revision 1.53.2.4.2.12
diff -u -d -r1.53.2.4.2.11 -r1.53.2.4.2.12
--- Menus.h     13 Mar 2009 00:36:03 -0000      1.53.2.4.2.11
+++ Menus.h     8 Sep 2009 00:18:27 -0000       1.53.2.4.2.12
@@ -218,22 +218,25 @@
    void OnHowToCopyDisplay();
    void OnAboutBrand();
 #elif (AUDACITY_BRANDING == BRAND_AUDIOTOUCH)
-   // Play menu
  private:
-   bool m_bWantPlayAfterOpen;
- public:
-   bool m_bWantPlayAfterRecord;
-
+   // Transport menu
    void OnPlayAfterOpen();
    void OnPlayAfterRecord();
+   void OnAppendRecording();
 
    // Help menu
    void OnAboutBrand();
    //void OnDifferences();
    void OnGetAudiotouch();
-#endif
 
-       //
+ public:
+   bool m_bWantPlayAfterRecord;
+   bool m_bWantAppendRecording;
+ private:
+   bool m_bWantPlayAfterOpen;
+ public:
+
+#endif
 
 void OnSeparator();
 


------------------------------------------------------------------------------
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

Reply via email to