/[svn]/linuxsampler/trunk/src/common/RTMath.cpp
ViewVC logotype

Diff of /linuxsampler/trunk/src/common/RTMath.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 360 by schoenebeck, Sat Dec 25 21:58:58 2004 UTC revision 361 by schoenebeck, Wed Feb 9 01:22:18 2005 UTC
# Line 25  Line 25 
25  float  RTMathBase::CentsToFreqTable[MAX_PITCH * 1200 * 2 + 1]; // +-1200 cents per octave  float  RTMathBase::CentsToFreqTable[MAX_PITCH * 1200 * 2 + 1]; // +-1200 cents per octave
26  float* RTMathBase::pCentsToFreqTable(InitCentsToFreqTable());  float* RTMathBase::pCentsToFreqTable(InitCentsToFreqTable());
27    
28    #if defined(__APPLE__)
29    #include <mach/mach_time.h>
30    typedef uint64_t time_stamp_t;
31    static inline time_stamp_t GetMachTime() {
32        return (time_stamp_t) mach_absolute_time();
33    }
34    #endif
35    
36  /*  /*
37   * Creates a real time stamp for the current moment. Out of efficiency this   * Creates a real time stamp for the current moment. Out of efficiency this
38   * is implemented in inline assembly for each CPU independently; we currently   * is implemented in inline assembly for each CPU independently; we currently
# Line 59  RTMathBase::time_stamp_t RTMathBase::Cre Line 67  RTMathBase::time_stamp_t RTMathBase::Cre
67      time_stamp_t t;      time_stamp_t t;
68      __asm__ __volatile__ ("rpcc %0" : "=r"(t));      __asm__ __volatile__ ("rpcc %0" : "=r"(t));
69      return t;      return t;
70        #elif defined(__APPLE__)
71        return GetMachTime();
72      #else // we don't want to use a slow generic solution      #else // we don't want to use a slow generic solution
73      #  error "Sorry, LinuxSampler lacks time stamp code for your system."      #  error "Sorry, LinuxSampler lacks time stamp code for your system."
74      #  error "Please report this error and the CPU you are using to the LinuxSampler developers mailing list!"      #  error "Please report this error and the CPU you are using to the LinuxSampler developers mailing list!"

Legend:
Removed from v.360  
changed lines
  Added in v.361

  ViewVC Help
Powered by ViewVC