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

Modified Files:
        Lyrics.cpp LyricsWindow.cpp Project.cpp TrackPanel.cpp 
Log Message:
some selection and update bug fixes for Karaoke window

Index: Project.cpp
===================================================================
RCS file: /cvsroot/audacity/audacity-src/src/Project.cpp,v
retrieving revision 1.450
retrieving revision 1.451
diff -u -d -r1.450 -r1.451
--- Project.cpp 21 Aug 2009 19:18:47 -0000      1.450
+++ Project.cpp 29 Aug 2009 05:01:04 -0000      1.451
@@ -3424,7 +3424,7 @@
          pLyricsPanel->Add(pLabelTrack->GetLabel(i)->t,
                            pLabelTrack->GetLabel(i)->title);
       pLyricsPanel->Finish(pLabelTrack->GetEndTime());
-      pLyricsPanel->Update(0.0);
+      pLyricsPanel->Update(this->GetSel0());
    }
 #endif
 

Index: Lyrics.cpp
===================================================================
RCS file: /cvsroot/audacity/audacity-src/src/Lyrics.cpp,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- Lyrics.cpp  1 Aug 2009 01:03:56 -0000       1.4
+++ Lyrics.cpp  29 Aug 2009 05:01:04 -0000      1.5
@@ -54,7 +54,7 @@
       {
          Syllable* pCurSyl = mLyrics->GetSyllable(nNewSyl);
          AudacityProject* pProj = GetActiveProject();
-         pProj->mViewInfo.sel0 = pCurSyl->t;
+         pProj->SetSel0(pCurSyl->t);
 
          //vvv Should probably select to end as in 
AudacityProject::OnSelectCursorEnd, 
          // but better to generalize that in AudacityProject methods. 
@@ -473,7 +473,7 @@
    }
    else // (mLyricsStyle == kHighlightLyrics)
    {
-      //vvvvv causes flicker in ported version
+      //v causes flicker in ported version
       //    this->SetHighlightFont();
    }
 }

Index: LyricsWindow.cpp
===================================================================
RCS file: /cvsroot/audacity/audacity-src/src/LyricsWindow.cpp,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- LyricsWindow.cpp    25 Aug 2009 05:53:15 -0000      1.8
+++ LyricsWindow.cpp    29 Aug 2009 05:01:04 -0000      1.9
@@ -79,6 +79,9 @@
    wxSize panelSize = gSize;
 
    //vvvvv not yet working right in ported version, so choice is disabled.
+   // It seems when you select highlight style, the TrackPanel timer stops 
working, but 
+   // going back to bouncing ball style starts it up again (!!!), per 
breakpoints in TrackPanel::OnTimer().
+   //
    //wxToolBar* pToolBar = this->CreateToolBar();
    //const int kHorizMargin = 8;
    //wxRadioButton* pRadioButton_BouncingBall = 
@@ -97,7 +100,7 @@
    //pToolBar->AddControl(pRadioButton_Highlight);
    //
    //panelPos.x += tbSize.GetHeight();
-   //panelSize.y -= tbSize.GetHeight())
+   //panelSize.y -= tbSize.GetHeight();
    //
    //#if defined(__WXMAC__)
    //   wxColour face = wxSystemSettings::GetColour(wxSYS_COLOUR_3DFACE);

Index: TrackPanel.cpp
===================================================================
RCS file: /cvsroot/audacity/audacity-src/src/TrackPanel.cpp,v
retrieving revision 1.475
retrieving revision 1.476
diff -u -d -r1.475 -r1.476
--- TrackPanel.cpp      21 Aug 2009 19:19:37 -0000      1.475
+++ TrackPanel.cpp      29 Aug 2009 05:01:04 -0000      1.476
@@ -820,7 +820,8 @@
    AudacityProject *p = GetProject();
 
    #ifdef EXPERIMENTAL_LYRICS_WINDOW
-      if (p->GetAudioIOToken() > 0) 
+      if ((p->GetAudioIOToken() > 0) &&
+            gAudioIO->IsStreamActive(p->GetAudioIOToken()))
       {
          // Update lyrics display. 
          LyricsWindow* pLyricsWindow = p->GetLyricsWindow();
@@ -833,13 +834,16 @@
    #endif
    #ifdef EXPERIMENTAL_MIXER_BOARD
       MixerBoard* pMixerBoard = this->GetMixerBoard();
-      if (pMixerBoard && (p->GetAudioIOToken() > 0))
+      if (pMixerBoard && 
+            (p->GetAudioIOToken() > 0) &&
+            gAudioIO->IsStreamActive(p->GetAudioIOToken()))
+      {
          pMixerBoard->UpdateMeters(gAudioIO->GetStreamTime(), 
                                     (p->mLastPlayMode == loopedPlay));
+      }
    #endif
 
-   // Each time the loop, check to see if we were playing or
-   // recording audio, but the stream has stopped.
+   // Check whether we were playing or recording, but the stream has stopped.
    if (p->GetAudioIOToken()>0 &&
          !gAudioIO->IsStreamActive(p->GetAudioIOToken())
          #ifdef EXPERIMENTAL_MIDI_OUT
@@ -848,6 +852,15 @@
       ) 
    {
       p->GetControlToolBar()->OnStop(dummyEvent);
+      #ifdef EXPERIMENTAL_LYRICS_WINDOW
+         // Reset lyrics display. 
+         LyricsWindow* pLyricsWindow = p->GetLyricsWindow();
+         if (pLyricsWindow) 
+         {
+            Lyrics* pLyricsPanel = pLyricsWindow->GetLyricsPanel();
+            pLyricsPanel->Update(p->GetSel0());
+         }
+      #endif
       #ifdef EXPERIMENTAL_MIXER_BOARD
          if (pMixerBoard) 
             pMixerBoard->ResetMeters();
@@ -1700,6 +1713,16 @@
    } 
  done:
    SelectionHandleDrag(event, t);
+   #ifdef EXPERIMENTAL_LYRICS_WINDOW
+      // Update lyrics display for new selection.
+      AudacityProject* pProj = GetActiveProject();
+      LyricsWindow* pLyricsWindow = pProj->GetLyricsWindow();
+      if (pLyricsWindow && pLyricsWindow->IsShown()) 
+      {
+         Lyrics* pLyricsPanel = pLyricsWindow->GetLyricsPanel();
+         pLyricsPanel->Update(pProj->GetSel0());
+      }
+   #endif
 }
 
 /// This function gets called when we're handling selection


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