31 |
Synthesizer<IMPL,CHAN,FILTER,INTERPOLATE,LOOP,CONSTPITCH>::SynthesizeFragment( \ |
Synthesizer<IMPL,CHAN,FILTER,INTERPOLATE,LOOP,CONSTPITCH>::SynthesizeFragment( \ |
32 |
voice, samples, pSrc, skip) |
voice, samples, pSrc, skip) |
33 |
#define SYNTHESIZEP(IMPL,CHAN,FILTER,INTERPOLATE,LOOP,CONSTPITCH) \ |
#define SYNTHESIZEP(IMPL,CHAN,FILTER,INTERPOLATE,LOOP,CONSTPITCH) \ |
34 |
unsigned long long start = Profiler::Stamp(); \ |
RTMath::time_stamp_t start = Profiler::Stamp(); \ |
35 |
Synthesizer<IMPL,CHAN,FILTER,INTERPOLATE,LOOP,CONSTPITCH>::SynthesizeFragment( \ |
Synthesizer<IMPL,CHAN,FILTER,INTERPOLATE,LOOP,CONSTPITCH>::SynthesizeFragment( \ |
36 |
voice, samples, pSrc, skip); \ |
voice, samples, pSrc, skip); \ |
37 |
Profiler::Record(start, samples, skip) |
Profiler::Record(start, samples, skip) |
146 |
SYNTHESIZE(CPP,STEREO,1,1,1,1); |
SYNTHESIZE(CPP,STEREO,1,1,1,1); |
147 |
} |
} |
148 |
|
|
149 |
|
#if ARCH_X86 |
150 |
|
|
151 |
void SynthesizeFragment_mode21(VOICE &voice, uint samples, sample_t* pSrc, uint skip) { |
void SynthesizeFragment_mode21(VOICE &voice, uint samples, sample_t* pSrc, uint skip) { |
152 |
SYNTHESIZE(ASM_X86_MMX_SSE,MONO,0,0,0,1); |
SYNTHESIZE(ASM_X86_MMX_SSE,MONO,0,0,0,1); |
153 |
} |
} |
244 |
SYNTHESIZE(ASM_X86_MMX_SSE,STEREO,1,1,1,1); |
SYNTHESIZE(ASM_X86_MMX_SSE,STEREO,1,1,1,1); |
245 |
} |
} |
246 |
|
|
247 |
|
#endif // ARCH_X86 |
248 |
|
|
249 |
//These are the same thing but with performance monitoring |
//These are the same thing but with performance monitoring |
250 |
void SynthesizeFragment_mode41(VOICE &voice, uint samples, sample_t* pSrc, uint skip) { |
void SynthesizeFragment_mode41(VOICE &voice, uint samples, sample_t* pSrc, uint skip) { |
355 |
SYNTHESIZEP(CPP,STEREO,1,1,1,1); |
SYNTHESIZEP(CPP,STEREO,1,1,1,1); |
356 |
} |
} |
357 |
|
|
358 |
|
#if ARCH_X86 |
359 |
|
|
360 |
void SynthesizeFragment_mode61(VOICE &voice, uint samples, sample_t* pSrc, uint skip) { |
void SynthesizeFragment_mode61(VOICE &voice, uint samples, sample_t* pSrc, uint skip) { |
361 |
SYNTHESIZEP(ASM_X86_MMX_SSE,MONO,0,0,0,1); |
SYNTHESIZEP(ASM_X86_MMX_SSE,MONO,0,0,0,1); |
362 |
} |
} |
453 |
SYNTHESIZEP(ASM_X86_MMX_SSE,STEREO,1,1,1,1); |
SYNTHESIZEP(ASM_X86_MMX_SSE,STEREO,1,1,1,1); |
454 |
} |
} |
455 |
|
|
456 |
|
#endif // ARCH_X86 |
457 |
|
|
458 |
void* GetSynthesisFunction(const int SynthesisMode) { |
void* GetSynthesisFunction(const int SynthesisMode) { |
459 |
// Mode Bits: IMPL,CHAN,FILT,INTERP,LOOP,CONSTPITCH |
// Mode Bits: IMPL,CHAN,FILT,INTERP,LOOP,CONSTPITCH |
460 |
switch (SynthesisMode) { |
switch (SynthesisMode) { |
490 |
case 0x1d: return (void*) SynthesizeFragment_mode1d; |
case 0x1d: return (void*) SynthesizeFragment_mode1d; |
491 |
case 0x1e: return (void*) SynthesizeFragment_mode1e; |
case 0x1e: return (void*) SynthesizeFragment_mode1e; |
492 |
case 0x1f: return (void*) SynthesizeFragment_mode1f; |
case 0x1f: return (void*) SynthesizeFragment_mode1f; |
493 |
|
#if ARCH_X86 |
494 |
case 0x20: // redundant |
case 0x20: // redundant |
495 |
case 0x21: return (void*) SynthesizeFragment_mode21; |
case 0x21: return (void*) SynthesizeFragment_mode21; |
496 |
case 0x22: // redundant |
case 0x22: // redundant |
523 |
case 0x3d: return (void*) SynthesizeFragment_mode3d; |
case 0x3d: return (void*) SynthesizeFragment_mode3d; |
524 |
case 0x3e: return (void*) SynthesizeFragment_mode3e; |
case 0x3e: return (void*) SynthesizeFragment_mode3e; |
525 |
case 0x3f: return (void*) SynthesizeFragment_mode3f; |
case 0x3f: return (void*) SynthesizeFragment_mode3f; |
526 |
|
#endif // ARCH_X86 |
527 |
|
|
528 |
//these are the same with performance monitoring |
//these are the same with performance monitoring |
529 |
case 0x40: // redundant |
case 0x40: // redundant |
558 |
case 0x5d: return (void*) SynthesizeFragment_mode5d; |
case 0x5d: return (void*) SynthesizeFragment_mode5d; |
559 |
case 0x5e: return (void*) SynthesizeFragment_mode5e; |
case 0x5e: return (void*) SynthesizeFragment_mode5e; |
560 |
case 0x5f: return (void*) SynthesizeFragment_mode5f; |
case 0x5f: return (void*) SynthesizeFragment_mode5f; |
561 |
|
#if ARCH_X86 |
562 |
case 0x60: // redundant |
case 0x60: // redundant |
563 |
case 0x61: return (void*) SynthesizeFragment_mode61; |
case 0x61: return (void*) SynthesizeFragment_mode61; |
564 |
case 0x62: // redundant |
case 0x62: // redundant |
591 |
case 0x7d: return (void*) SynthesizeFragment_mode7d; |
case 0x7d: return (void*) SynthesizeFragment_mode7d; |
592 |
case 0x7e: return (void*) SynthesizeFragment_mode7e; |
case 0x7e: return (void*) SynthesizeFragment_mode7e; |
593 |
case 0x7f: return (void*) SynthesizeFragment_mode7f; |
case 0x7f: return (void*) SynthesizeFragment_mode7f; |
594 |
|
#endif // ARCH_X86 |
595 |
default: { |
default: { |
596 |
printf("gig::Synthesizer: Invalid Synthesis Mode: %d\n", SynthesisMode); |
printf("gig::Synthesizer: Invalid Synthesis Mode: %d\n", SynthesisMode); |
597 |
exit(-1); |
exit(-1); |
604 |
SynthesizeFragment_Fn* f = (SynthesizeFragment_Fn*) GetSynthesisFunction(SynthesisMode); |
SynthesizeFragment_Fn* f = (SynthesizeFragment_Fn*) GetSynthesisFunction(SynthesisMode); |
605 |
f(voice, Samples, pSrc, Skip); |
f(voice, Samples, pSrc, Skip); |
606 |
} |
} |
607 |
|
|
608 |
}} // namespace LinuxSampler::gig |
}} // namespace LinuxSampler::gig |