Update of /cvsroot/audacity/audacity-src/src
In directory sc8-pr-cvs11.sourceforge.net:/tmp/cvs-serv4923
Modified Files:
AudacityApp.cpp AudioIO.cpp TrackArtist.cpp TrackPanel.cpp
WaveTrack.cpp float_cast.h
Log Message:
Include float_cast.h to get lrint() and add llrint().
Fix abs() call.
Index: AudacityApp.cpp
===================================================================
RCS file: /cvsroot/audacity/audacity-src/src/AudacityApp.cpp,v
retrieving revision 1.163
retrieving revision 1.164
diff -u -d -r1.163 -r1.164
--- AudacityApp.cpp 26 Mar 2007 08:22:46 -0000 1.163
+++ AudacityApp.cpp 29 Mar 2007 04:30:46 -0000 1.164
@@ -17,6 +17,7 @@
#include "Audacity.h" // This should always be included first
+#include "float_cast.h"
#include <wx/defs.h>
#include <wx/app.h>
Index: TrackArtist.cpp
===================================================================
RCS file: /cvsroot/audacity/audacity-src/src/TrackArtist.cpp,v
retrieving revision 1.92
retrieving revision 1.93
diff -u -d -r1.92 -r1.93
--- TrackArtist.cpp 28 Mar 2007 04:14:03 -0000 1.92
+++ TrackArtist.cpp 29 Mar 2007 04:30:46 -0000 1.93
@@ -22,6 +22,7 @@
#include "Audacity.h"
#include "TrackArtist.h"
+#include "float_cast.h"
#include <math.h>
#include <float.h>
Index: AudioIO.cpp
===================================================================
RCS file: /cvsroot/audacity/audacity-src/src/AudioIO.cpp,v
retrieving revision 1.154
retrieving revision 1.155
diff -u -d -r1.154 -r1.155
--- AudioIO.cpp 28 Mar 2007 04:14:03 -0000 1.154
+++ AudioIO.cpp 29 Mar 2007 04:30:46 -0000 1.155
@@ -40,6 +40,7 @@
*//*******************************************************************/
#include "Audacity.h"
+#include "float_cast.h"
#include <math.h>
#include <stdlib.h>
Index: TrackPanel.cpp
===================================================================
RCS file: /cvsroot/audacity/audacity-src/src/TrackPanel.cpp,v
retrieving revision 1.349
retrieving revision 1.350
diff -u -d -r1.349 -r1.350
--- TrackPanel.cpp 28 Mar 2007 18:57:44 -0000 1.349
+++ TrackPanel.cpp 29 Mar 2007 04:30:46 -0000 1.350
@@ -1815,7 +1815,7 @@
const int minimumSizedSelection = 5; //measured in pixels
wxInt64 SelStart=TimeToPosition( mSelStart, r.x); //cvt time to pixels.
// Abandon this drag if selecting < 5 pixels.
- if(abs( SelStart-x) < minimumSizedSelection)
+ if(wxLongLong(SelStart-x).Abs() < minimumSizedSelection)
return;
// Handle which tracks are selected
Index: WaveTrack.cpp
===================================================================
RCS file: /cvsroot/audacity/audacity-src/src/WaveTrack.cpp,v
retrieving revision 1.100
retrieving revision 1.101
diff -u -d -r1.100 -r1.101
--- WaveTrack.cpp 28 Mar 2007 04:14:03 -0000 1.100
+++ WaveTrack.cpp 29 Mar 2007 04:30:47 -0000 1.101
@@ -33,6 +33,8 @@
#include <math.h>
+#include "float_cast.h"
+
#include "WaveTrack.h"
#include "Envelope.h"
Index: float_cast.h
===================================================================
RCS file: /cvsroot/audacity/audacity-src/src/float_cast.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- float_cast.h 2 Oct 2003 02:34:13 -0000 1.4
+++ float_cast.h 29 Mar 2007 04:30:47 -0000 1.5
@@ -89,6 +89,30 @@
return intgr ;
}
+ __inline long long int
+ llrint (double flt)
+ { long long int intgr;
+
+ _asm
+ { fld flt
+ fistp intgr
+ } ;
+
+ return intgr ;
+ }
+
+ __inline long long int
+ llrintf (float flt)
+ { long long int intgr;
+
+ _asm
+ { fld flt
+ fistp intgr
+ } ;
+
+ return intgr ;
+ }
+
#else
/* dmazzoni: modified these to do a proper rounding, even though
-------------------------------------------------------------------------
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