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

Modified Files:
      Tag: Audacity_UmixIt
        TimeTrack.cpp WaveTrack.cpp 
Log Message:
Use the new XMLValueChecker::IsValidChannel instead of replicating it.

Index: TimeTrack.cpp
===================================================================
RCS file: /cvsroot/audacity/audacity-src/src/TimeTrack.cpp,v
retrieving revision 1.8.2.1.4.2
retrieving revision 1.8.2.1.4.3
diff -u -d -r1.8.2.1.4.2 -r1.8.2.1.4.3
--- TimeTrack.cpp       18 Dec 2006 05:26:23 -0000      1.8.2.1.4.2
+++ TimeTrack.cpp       21 Dec 2006 21:36:14 -0000      1.8.2.1.4.3
@@ -108,7 +108,8 @@
          const wxString strValue = value;
          if (!strcmp(attr, "offset"))
          {
-            if (!XMLValueChecker::IsGoodString(strValue) || 
!Internat::CompatibleToDouble(strValue, &dblValue))
+            if (!XMLValueChecker::IsGoodString(strValue) || 
+                  !Internat::CompatibleToDouble(strValue, &dblValue))
                return false;
             mOffset = dblValue;
             mEnvelope->SetOffset(mOffset);
@@ -118,7 +119,7 @@
          else if (!strcmp(attr, "channel"))
          {
             if (!XMLValueChecker::IsGoodInt(strValue) || 
!strValue.ToLong(&nValue) || 
-                  (nValue < LeftChannel) || (nValue > MonoChannel))
+                  !XMLValueChecker::IsValidChannel(nValue))
                return false;
             mChannel = nValue;
          }

Index: WaveTrack.cpp
===================================================================
RCS file: /cvsroot/audacity/audacity-src/src/WaveTrack.cpp,v
retrieving revision 1.51.2.2.2.3
retrieving revision 1.51.2.2.2.4
diff -u -d -r1.51.2.2.2.3 -r1.51.2.2.2.4
--- WaveTrack.cpp       20 Dec 2006 22:55:45 -0000      1.51.2.2.2.3
+++ WaveTrack.cpp       21 Dec 2006 21:36:15 -0000      1.51.2.2.2.4
@@ -882,22 +882,26 @@
          const wxString strValue = value;
          if (!strcmp(attr, "rate"))
          {
-            if (!XMLValueChecker::IsGoodString(strValue) || 
!Internat::CompatibleToDouble(strValue, &dblValue) ||
+            if (!XMLValueChecker::IsGoodString(strValue) || 
+                  !Internat::CompatibleToDouble(strValue, &dblValue) ||
                   (dblValue < 100.0) || (dblValue > 100000.0)) // same bounds 
as ImportRawDialog::OnOK
                return false;
             mRate = dblValue;
          }
          else if (!strcmp(attr, "offset") && 
-                  XMLValueChecker::IsGoodString(strValue) && 
Internat::CompatibleToDouble(strValue, &dblValue))
+                  XMLValueChecker::IsGoodString(strValue) && 
+                  Internat::CompatibleToDouble(strValue, &dblValue))
          {
             mOffset = dblValue;
             mEnvelope->SetOffset(mOffset);
          }
          else if (!strcmp(attr, "gain") && 
-                  XMLValueChecker::IsGoodString(strValue) && 
Internat::CompatibleToDouble(strValue, &dblValue))
+                  XMLValueChecker::IsGoodString(strValue) && 
+                  Internat::CompatibleToDouble(strValue, &dblValue))
             mGain = dblValue;
          else if (!strcmp(attr, "pan") && 
-                  XMLValueChecker::IsGoodString(strValue) && 
Internat::CompatibleToDouble(strValue, &dblValue) && 
+                  XMLValueChecker::IsGoodString(strValue) && 
+                  Internat::CompatibleToDouble(strValue, &dblValue) && 
                   (dblValue >= -1.0) && (dblValue <= 1.0))
             mPan = dblValue;
          else if (!strcmp(attr, "name") && 
XMLValueChecker::IsGoodString(strValue))
@@ -905,7 +909,7 @@
          else if (!strcmp(attr, "channel"))
          {
             if (!XMLValueChecker::IsGoodInt(strValue) || 
!strValue.ToLong(&nValue) || 
-                  (nValue < LeftChannel) || (nValue > MonoChannel))
+                  !XMLValueChecker::IsValidChannel(nValue))
                return false;
             mChannel = nValue;
          }


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Audacity-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/audacity-cvs

Reply via email to