/[svn]/linuxsampler/trunk/src/engines/gig/Synthesizer.h
ViewVC logotype

Diff of /linuxsampler/trunk/src/engines/gig/Synthesizer.h

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

revision 617 by schoenebeck, Wed Jun 8 21:00:06 2005 UTC revision 685 by persson, Tue Jul 5 19:30:37 2005 UTC
# Line 193  namespace LinuxSampler { namespace gig { Line 193  namespace LinuxSampler { namespace gig {
193               */               */
194              inline static int DiffToLoopEnd(const float& LoopEnd, const void* Pos, const float& Pitch) {              inline static int DiffToLoopEnd(const float& LoopEnd, const void* Pos, const float& Pitch) {
195                  switch (IMPLEMENTATION) {                  switch (IMPLEMENTATION) {
                     // pure C++ implementation (thus platform independent)  
                     case CPP: {  
                         return uint((LoopEnd - *((double *)Pos)) / Pitch);  
                     }  
196                      #if CONFIG_ASM && ARCH_X86                      #if CONFIG_ASM && ARCH_X86
197                      case ASM_X86_MMX_SSE: {                      case ASM_X86_MMX_SSE: {
198                          int result;                          int result;
# Line 213  namespace LinuxSampler { namespace gig { Line 209  namespace LinuxSampler { namespace gig {
209                          return result;                          return result;
210                      }                      }
211                      #endif // CONFIG_ASM && ARCH_X86                      #endif // CONFIG_ASM && ARCH_X86
212                        // pure C++ implementation (thus platform independent)
213                        default: {
214                            return uint((LoopEnd - *((double *)Pos)) / Pitch);
215                        }
216                  }                  }
217              }              }
218    
# Line 225  namespace LinuxSampler { namespace gig { Line 225  namespace LinuxSampler { namespace gig {
225               */               */
226              inline static int WrapLoop(const float& LoopStart, const float& LoopSize, const float& LoopEnd, void* vPos) {              inline static int WrapLoop(const float& LoopStart, const float& LoopSize, const float& LoopEnd, void* vPos) {
227                  switch (IMPLEMENTATION) {                  switch (IMPLEMENTATION) {
                     // pure C++ implementation (thus platform independent)  
                     case CPP: {  
                         double * Pos = (double *)vPos;  
                         if (*Pos < LoopEnd) return 0;  
                         *Pos = fmod(*Pos - LoopEnd, LoopSize) + LoopStart;  
                         return 1;  
                     }  
228                      #if CONFIG_ASM && ARCH_X86                      #if CONFIG_ASM && ARCH_X86
229                      case ASM_X86_MMX_SSE: {                      case ASM_X86_MMX_SSE: {
230                          int result = 0;                          int result = 0;
# Line 265  namespace LinuxSampler { namespace gig { Line 258  namespace LinuxSampler { namespace gig {
258                          return result;                          return result;
259                      }                      }
260                      #endif // CONFIG_ASM && ARCH_X86                      #endif // CONFIG_ASM && ARCH_X86
261                        // pure C++ implementation (thus platform independent)
262                        default: {
263                            double * Pos = (double *)vPos;
264                            if (*Pos < LoopEnd) return 0;
265                            *Pos = fmod(*Pos - LoopEnd, LoopSize) + LoopStart;
266                            return 1;
267                        }
268                  }                  }
269              }              }
270    

Legend:
Removed from v.617  
changed lines
  Added in v.685

  ViewVC Help
Powered by ViewVC