/[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 332 by senkov, Sat Jan 1 03:06:06 2005 UTC revision 361 by schoenebeck, Wed Feb 9 01:22:18 2005 UTC
# Line 79  namespace LinuxSampler { namespace gig { Line 79  namespace LinuxSampler { namespace gig {
79                                         (void *)&fPos,                                         (void *)&fPos,
80                                         Voice.PitchBase,                                         Voice.PitchBase,
81                                         Voice.PitchBend);                                         Voice.PitchBend);
82                        #if  ARCH_X86
83                      if (INTERPOLATE) EMMS;                      if (INTERPOLATE) EMMS;
84                        #endif
85                      Voice.Pos = (double) fPos;                      Voice.Pos = (double) fPos;
86                  } else {                  } else {
87                      SynthesizeFragment(Voice, Samples, pSrc, i, Voice.pSample->LoopPlayCount,                      SynthesizeFragment(Voice, Samples, pSrc, i, Voice.pSample->LoopPlayCount,
# Line 183  namespace LinuxSampler { namespace gig { Line 185  namespace LinuxSampler { namespace gig {
185                      }                      }
186                      #if ARCH_X86                      #if ARCH_X86
187                      case ASM_X86_MMX_SSE: {                      case ASM_X86_MMX_SSE: {
188                          int result;                          int result = 0;
189                          __asm__ __volatile__ (                          __asm__ __volatile__ (
190                              "movss  (%2), %%xmm0          # load LoopEnd\n\t"                              "movss  (%2), %%xmm0          # load LoopEnd\n\t"
191                              "movss  (%1), %%xmm1          # load Pos\n\t"                              "movss  (%1), %%xmm1          # load Pos\n\t"
192                              "comiss %%xmm0, %%xmm1      # LoopEnd <> Pos\n\t"                              "comiss %%xmm0, %%xmm1      # LoopEnd <> Pos\n\t"
                             "movl    $0,%%eax            # result = 0\n\t"  
193                              "jb     1f                  # jump if no work needs to be done\n\t"                              "jb     1f                  # jump if no work needs to be done\n\t"
194                              "movss    (%3), %%xmm2        # load LoopSize\n\t"                              "movss    (%3), %%xmm2        # load LoopSize\n\t"
195                              "subss    %%xmm0, %%xmm1    # Pos - LoopEnd\n\t"                              "subss    %%xmm0, %%xmm1    # Pos - LoopEnd\n\t"
# Line 203  namespace LinuxSampler { namespace gig { Line 204  namespace LinuxSampler { namespace gig {
204                              //done with fmodf                              //done with fmodf
205                              "addss    %%xmm0, %%xmm3      # add LoopStart\n\t"                              "addss    %%xmm0, %%xmm3      # add LoopStart\n\t"
206                              "movss    %%xmm3, (%1)        # update Pos\n\t"                              "movss    %%xmm3, (%1)        # update Pos\n\t"
207                              "movl    $1,%%eax            # result = 1\n\t"                              "movl    $1, (%0)             # result = 1\n\t"
208                              ".balign 16 \n\t"                              ".balign 16 \n\t"
209                              "1:\n\t"                              "1:\n\t"
210                              : "=a" (result)     /* %0 */                              :: "r" (&result),   /* %0 */
211                              : "r"  (vPos),      /* %1 */                                "r"  (vPos),      /* %1 */
212                                "r"  (&LoopEnd),  /* %2 */                                "r"  (&LoopEnd),  /* %2 */
213                                "r"  (&LoopSize), /* %3 */                                "r"  (&LoopSize), /* %3 */
214                                "r"  (&LoopStart) /* %4 */                                "r"  (&LoopStart) /* %4 */

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

  ViewVC Help
Powered by ViewVC