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

Annotation of /linuxsampler/trunk/src/engines/gig/Synthesizer.cpp

Parent Directory Parent Directory | Revision Log Revision Log


Revision 328 - (hide annotations) (download)
Sat Dec 25 21:58:58 2004 UTC (19 years, 4 months ago) by schoenebeck
File size: 25192 byte(s)
* architecture independence fixes, should now compile again for non x86
  systems
* tiny fix of command line switch --version

1 schoenebeck 320 /***************************************************************************
2     * *
3     * LinuxSampler - modular, streaming capable sampler *
4     * *
5     * Copyright (C) 2003, 2004 by Benno Senoner and Christian Schoenebeck *
6     * *
7     * This program is free software; you can redistribute it and/or modify *
8     * it under the terms of the GNU General Public License as published by *
9     * the Free Software Foundation; either version 2 of the License, or *
10     * (at your option) any later version. *
11     * *
12     * This program is distributed in the hope that it will be useful, *
13     * but WITHOUT ANY WARRANTY; without even the implied warranty of *
14     * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
15     * GNU General Public License for more details. *
16     * *
17     * You should have received a copy of the GNU General Public License *
18     * along with this program; if not, write to the Free Software *
19     * Foundation, Inc., 59 Temple Place, Suite 330, Boston, *
20     * MA 02111-1307 USA *
21     ***************************************************************************/
22    
23     #include <unistd.h>
24     #include <stdlib.h>
25     #include <stdio.h>
26    
27     #include "Synthesizer.h"
28 senkov 325 #include "Profiler.h"
29 schoenebeck 320
30     #define SYNTHESIZE(IMPL,CHAN,FILTER,INTERPOLATE,LOOP,CONSTPITCH) \
31     Synthesizer<IMPL,CHAN,FILTER,INTERPOLATE,LOOP,CONSTPITCH>::SynthesizeFragment( \
32     voice, samples, pSrc, skip)
33 senkov 325 #define SYNTHESIZEP(IMPL,CHAN,FILTER,INTERPOLATE,LOOP,CONSTPITCH) \
34 schoenebeck 328 RTMath::time_stamp_t start = Profiler::Stamp(); \
35 senkov 325 Synthesizer<IMPL,CHAN,FILTER,INTERPOLATE,LOOP,CONSTPITCH>::SynthesizeFragment( \
36     voice, samples, pSrc, skip); \
37     Profiler::Record(start, samples, skip)
38 schoenebeck 320
39     namespace LinuxSampler { namespace gig {
40    
41 senkov 325 void SynthesizeFragment_mode01(VOICE &voice, uint samples, sample_t* pSrc, uint skip) {
42 schoenebeck 320 SYNTHESIZE(CPP,MONO,0,0,0,1);
43     }
44    
45 senkov 325 void SynthesizeFragment_mode02(VOICE &voice, uint samples, sample_t* pSrc, uint skip) {
46 schoenebeck 320 SYNTHESIZE(CPP,MONO,0,0,1,1);
47     }
48    
49 senkov 325 void SynthesizeFragment_mode03(VOICE &voice, uint samples, sample_t* pSrc, uint skip) {
50 schoenebeck 320 SYNTHESIZE(CPP,MONO,0,0,1,1);
51     }
52    
53 senkov 325 void SynthesizeFragment_mode04(VOICE &voice, uint samples, sample_t* pSrc, uint skip) {
54 schoenebeck 320 SYNTHESIZE(CPP,MONO,0,1,0,0);
55     }
56    
57 senkov 325 void SynthesizeFragment_mode05(VOICE &voice, uint samples, sample_t* pSrc, uint skip) {
58 schoenebeck 320 SYNTHESIZE(CPP,MONO,0,1,0,1);
59     }
60    
61 senkov 325 void SynthesizeFragment_mode06(VOICE &voice, uint samples, sample_t* pSrc, uint skip) {
62 schoenebeck 320 SYNTHESIZE(CPP,MONO,0,1,1,0);
63     }
64    
65 senkov 325 void SynthesizeFragment_mode07(VOICE &voice, uint samples, sample_t* pSrc, uint skip) {
66 schoenebeck 320 SYNTHESIZE(CPP,MONO,0,1,1,1);
67     }
68    
69 senkov 325 void SynthesizeFragment_mode08(VOICE &voice, uint samples, sample_t* pSrc, uint skip) {
70 schoenebeck 320 SYNTHESIZE(CPP,MONO,1,0,0,1);
71     }
72    
73 senkov 325 void SynthesizeFragment_mode09(VOICE &voice, uint samples, sample_t* pSrc, uint skip) {
74 schoenebeck 320 SYNTHESIZE(CPP,MONO,1,0,0,1);
75     }
76    
77 senkov 325 void SynthesizeFragment_mode0a(VOICE &voice, uint samples, sample_t* pSrc, uint skip) {
78 schoenebeck 320 SYNTHESIZE(CPP,MONO,1,0,1,1);
79     }
80    
81 senkov 325 void SynthesizeFragment_mode0b(VOICE &voice, uint samples, sample_t* pSrc, uint skip) {
82 schoenebeck 320 SYNTHESIZE(CPP,MONO,1,0,1,1);
83     }
84    
85 senkov 325 void SynthesizeFragment_mode0c(VOICE &voice, uint samples, sample_t* pSrc, uint skip) {
86 schoenebeck 320 SYNTHESIZE(CPP,MONO,1,1,0,0);
87     }
88    
89 senkov 325 void SynthesizeFragment_mode0d(VOICE &voice, uint samples, sample_t* pSrc, uint skip) {
90 schoenebeck 320 SYNTHESIZE(CPP,MONO,1,1,0,1);
91     }
92    
93 senkov 325 void SynthesizeFragment_mode0e(VOICE &voice, uint samples, sample_t* pSrc, uint skip) {
94 schoenebeck 320 SYNTHESIZE(CPP,MONO,1,1,1,0);
95     }
96    
97 senkov 325 void SynthesizeFragment_mode0f(VOICE &voice, uint samples, sample_t* pSrc, uint skip) {
98 schoenebeck 320 SYNTHESIZE(CPP,MONO,1,1,1,1);
99     }
100    
101 senkov 325 void SynthesizeFragment_mode11(VOICE &voice, uint samples, sample_t* pSrc, uint skip) {
102 schoenebeck 320 SYNTHESIZE(CPP,STEREO,0,0,0,1);
103     }
104    
105 senkov 325 void SynthesizeFragment_mode13(VOICE &voice, uint samples, sample_t* pSrc, uint skip) {
106 schoenebeck 320 SYNTHESIZE(CPP,STEREO,0,0,1,1);
107     }
108    
109 senkov 325 void SynthesizeFragment_mode14(VOICE &voice, uint samples, sample_t* pSrc, uint skip) {
110 schoenebeck 320 SYNTHESIZE(CPP,STEREO,0,1,0,0);
111     }
112    
113 senkov 325 void SynthesizeFragment_mode15(VOICE &voice, uint samples, sample_t* pSrc, uint skip) {
114 schoenebeck 320 SYNTHESIZE(CPP,STEREO,0,1,0,1);
115     }
116    
117 senkov 325 void SynthesizeFragment_mode16(VOICE &voice, uint samples, sample_t* pSrc, uint skip) {
118 schoenebeck 320 SYNTHESIZE(CPP,STEREO,0,1,1,0);
119     }
120    
121 senkov 325 void SynthesizeFragment_mode17(VOICE &voice, uint samples, sample_t* pSrc, uint skip) {
122 schoenebeck 320 SYNTHESIZE(CPP,STEREO,0,1,1,1);
123     }
124    
125 senkov 325 void SynthesizeFragment_mode19(VOICE &voice, uint samples, sample_t* pSrc, uint skip) {
126 schoenebeck 320 SYNTHESIZE(CPP,STEREO,1,0,0,1);
127     }
128    
129 senkov 325 void SynthesizeFragment_mode1b(VOICE &voice, uint samples, sample_t* pSrc, uint skip) {
130 schoenebeck 320 SYNTHESIZE(CPP,STEREO,1,0,1,1);
131     }
132    
133 senkov 325 void SynthesizeFragment_mode1c(VOICE &voice, uint samples, sample_t* pSrc, uint skip) {
134 schoenebeck 320 SYNTHESIZE(CPP,STEREO,1,1,0,0);
135     }
136    
137 senkov 325 void SynthesizeFragment_mode1d(VOICE &voice, uint samples, sample_t* pSrc, uint skip) {
138 schoenebeck 320 SYNTHESIZE(CPP,STEREO,1,1,0,1);
139     }
140    
141 senkov 325 void SynthesizeFragment_mode1e(VOICE &voice, uint samples, sample_t* pSrc, uint skip) {
142 schoenebeck 320 SYNTHESIZE(CPP,STEREO,1,1,1,0);
143     }
144    
145 senkov 325 void SynthesizeFragment_mode1f(VOICE &voice, uint samples, sample_t* pSrc, uint skip) {
146 schoenebeck 320 SYNTHESIZE(CPP,STEREO,1,1,1,1);
147     }
148    
149 schoenebeck 328 #if ARCH_X86
150    
151 senkov 325 void SynthesizeFragment_mode21(VOICE &voice, uint samples, sample_t* pSrc, uint skip) {
152 schoenebeck 320 SYNTHESIZE(ASM_X86_MMX_SSE,MONO,0,0,0,1);
153     }
154    
155 senkov 325 void SynthesizeFragment_mode23(VOICE &voice, uint samples, sample_t* pSrc, uint skip) {
156 schoenebeck 320 SYNTHESIZE(ASM_X86_MMX_SSE,MONO,0,0,1,1);
157     }
158    
159 senkov 325 void SynthesizeFragment_mode24(VOICE &voice, uint samples, sample_t* pSrc, uint skip) {
160 schoenebeck 320 SYNTHESIZE(ASM_X86_MMX_SSE,MONO,0,1,0,0);
161     }
162    
163 senkov 325 void SynthesizeFragment_mode25(VOICE &voice, uint samples, sample_t* pSrc, uint skip) {
164 schoenebeck 320 SYNTHESIZE(ASM_X86_MMX_SSE,MONO,0,1,0,1);
165     }
166    
167 senkov 325 void SynthesizeFragment_mode26(VOICE &voice, uint samples, sample_t* pSrc, uint skip) {
168 schoenebeck 320 SYNTHESIZE(ASM_X86_MMX_SSE,MONO,0,1,1,0);
169     }
170    
171 senkov 325 void SynthesizeFragment_mode27(VOICE &voice, uint samples, sample_t* pSrc, uint skip) {
172 schoenebeck 320 SYNTHESIZE(ASM_X86_MMX_SSE,MONO,0,1,1,1);
173     }
174    
175 senkov 325 void SynthesizeFragment_mode29(VOICE &voice, uint samples, sample_t* pSrc, uint skip) {
176 schoenebeck 320 SYNTHESIZE(ASM_X86_MMX_SSE,MONO,1,0,0,1);
177     }
178    
179 senkov 325 void SynthesizeFragment_mode2b(VOICE &voice, uint samples, sample_t* pSrc, uint skip) {
180 schoenebeck 320 SYNTHESIZE(ASM_X86_MMX_SSE,MONO,1,0,1,1);
181     }
182    
183 senkov 325 void SynthesizeFragment_mode2c(VOICE &voice, uint samples, sample_t* pSrc, uint skip) {
184 schoenebeck 320 SYNTHESIZE(ASM_X86_MMX_SSE,MONO,1,1,0,0);
185     }
186    
187 senkov 325 void SynthesizeFragment_mode2d(VOICE &voice, uint samples, sample_t* pSrc, uint skip) {
188 schoenebeck 320 SYNTHESIZE(ASM_X86_MMX_SSE,MONO,1,1,0,1);
189     }
190    
191 senkov 325 void SynthesizeFragment_mode2e(VOICE &voice, uint samples, sample_t* pSrc, uint skip) {
192 schoenebeck 320 SYNTHESIZE(ASM_X86_MMX_SSE,MONO,1,1,1,0);
193     }
194    
195 senkov 325 void SynthesizeFragment_mode2f(VOICE &voice, uint samples, sample_t* pSrc, uint skip) {
196 schoenebeck 320 SYNTHESIZE(ASM_X86_MMX_SSE,MONO,1,1,1,1);
197     }
198    
199 senkov 325 void SynthesizeFragment_mode31(VOICE &voice, uint samples, sample_t* pSrc, uint skip) {
200 schoenebeck 320 SYNTHESIZE(ASM_X86_MMX_SSE,STEREO,0,0,0,1);
201     }
202    
203 senkov 325 void SynthesizeFragment_mode33(VOICE &voice, uint samples, sample_t* pSrc, uint skip) {
204 schoenebeck 320 SYNTHESIZE(ASM_X86_MMX_SSE,STEREO,0,0,1,1);
205     }
206    
207 senkov 325 void SynthesizeFragment_mode34(VOICE &voice, uint samples, sample_t* pSrc, uint skip) {
208 schoenebeck 320 SYNTHESIZE(ASM_X86_MMX_SSE,STEREO,0,1,0,0);
209     }
210    
211 senkov 325 void SynthesizeFragment_mode35(VOICE &voice, uint samples, sample_t* pSrc, uint skip) {
212 schoenebeck 320 SYNTHESIZE(ASM_X86_MMX_SSE,STEREO,0,1,0,1);
213     }
214    
215 senkov 325 void SynthesizeFragment_mode36(VOICE &voice, uint samples, sample_t* pSrc, uint skip) {
216 schoenebeck 320 SYNTHESIZE(ASM_X86_MMX_SSE,STEREO,0,1,1,0);
217     }
218    
219 senkov 325 void SynthesizeFragment_mode37(VOICE &voice, uint samples, sample_t* pSrc, uint skip) {
220 schoenebeck 320 SYNTHESIZE(ASM_X86_MMX_SSE,STEREO,0,1,1,1);
221     }
222    
223 senkov 325 void SynthesizeFragment_mode39(VOICE &voice, uint samples, sample_t* pSrc, uint skip) {
224 schoenebeck 320 SYNTHESIZE(ASM_X86_MMX_SSE,STEREO,1,0,0,1);
225     }
226    
227 senkov 325 void SynthesizeFragment_mode3b(VOICE &voice, uint samples, sample_t* pSrc, uint skip) {
228 schoenebeck 320 SYNTHESIZE(ASM_X86_MMX_SSE,STEREO,1,0,1,1);
229     }
230    
231 senkov 325 void SynthesizeFragment_mode3c(VOICE &voice, uint samples, sample_t* pSrc, uint skip) {
232 schoenebeck 320 SYNTHESIZE(ASM_X86_MMX_SSE,STEREO,1,1,0,0);
233     }
234    
235 senkov 325 void SynthesizeFragment_mode3d(VOICE &voice, uint samples, sample_t* pSrc, uint skip) {
236 schoenebeck 320 SYNTHESIZE(ASM_X86_MMX_SSE,STEREO,1,1,0,1);
237     }
238    
239 senkov 325 void SynthesizeFragment_mode3e(VOICE &voice, uint samples, sample_t* pSrc, uint skip) {
240 schoenebeck 320 SYNTHESIZE(ASM_X86_MMX_SSE,STEREO,1,1,1,0);
241     }
242    
243 senkov 325 void SynthesizeFragment_mode3f(VOICE &voice, uint samples, sample_t* pSrc, uint skip) {
244 schoenebeck 320 SYNTHESIZE(ASM_X86_MMX_SSE,STEREO,1,1,1,1);
245     }
246    
247 schoenebeck 328 #endif // ARCH_X86
248 senkov 325
249     //These are the same thing but with performance monitoring
250     void SynthesizeFragment_mode41(VOICE &voice, uint samples, sample_t* pSrc, uint skip) {
251     SYNTHESIZEP(CPP,MONO,0,0,0,1);
252     }
253    
254     void SynthesizeFragment_mode42(VOICE &voice, uint samples, sample_t* pSrc, uint skip) {
255     SYNTHESIZEP(CPP,MONO,0,0,1,1);
256     }
257    
258     void SynthesizeFragment_mode43(VOICE &voice, uint samples, sample_t* pSrc, uint skip) {
259     SYNTHESIZEP(CPP,MONO,0,0,1,1);
260     }
261    
262     void SynthesizeFragment_mode44(VOICE &voice, uint samples, sample_t* pSrc, uint skip) {
263     SYNTHESIZEP(CPP,MONO,0,1,0,0);
264     }
265    
266     void SynthesizeFragment_mode45(VOICE &voice, uint samples, sample_t* pSrc, uint skip) {
267     SYNTHESIZEP(CPP,MONO,0,1,0,1);
268     }
269    
270     void SynthesizeFragment_mode46(VOICE &voice, uint samples, sample_t* pSrc, uint skip) {
271     SYNTHESIZEP(CPP,MONO,0,1,1,0);
272     }
273    
274     void SynthesizeFragment_mode47(VOICE &voice, uint samples, sample_t* pSrc, uint skip) {
275     SYNTHESIZEP(CPP,MONO,0,1,1,1);
276     }
277    
278     void SynthesizeFragment_mode48(VOICE &voice, uint samples, sample_t* pSrc, uint skip) {
279     SYNTHESIZEP(CPP,MONO,1,0,0,1);
280     }
281    
282     void SynthesizeFragment_mode49(VOICE &voice, uint samples, sample_t* pSrc, uint skip) {
283     SYNTHESIZEP(CPP,MONO,1,0,0,1);
284     }
285    
286     void SynthesizeFragment_mode4a(VOICE &voice, uint samples, sample_t* pSrc, uint skip) {
287     SYNTHESIZEP(CPP,MONO,1,0,1,1);
288     }
289    
290     void SynthesizeFragment_mode4b(VOICE &voice, uint samples, sample_t* pSrc, uint skip) {
291     SYNTHESIZEP(CPP,MONO,1,0,1,1);
292     }
293    
294     void SynthesizeFragment_mode4c(VOICE &voice, uint samples, sample_t* pSrc, uint skip) {
295     SYNTHESIZEP(CPP,MONO,1,1,0,0);
296     }
297    
298     void SynthesizeFragment_mode4d(VOICE &voice, uint samples, sample_t* pSrc, uint skip) {
299     SYNTHESIZEP(CPP,MONO,1,1,0,1);
300     }
301    
302     void SynthesizeFragment_mode4e(VOICE &voice, uint samples, sample_t* pSrc, uint skip) {
303     SYNTHESIZEP(CPP,MONO,1,1,1,0);
304     }
305    
306     void SynthesizeFragment_mode4f(VOICE &voice, uint samples, sample_t* pSrc, uint skip) {
307     SYNTHESIZEP(CPP,MONO,1,1,1,1);
308     }
309    
310     void SynthesizeFragment_mode51(VOICE &voice, uint samples, sample_t* pSrc, uint skip) {
311     SYNTHESIZEP(CPP,STEREO,0,0,0,1);
312     }
313    
314     void SynthesizeFragment_mode53(VOICE &voice, uint samples, sample_t* pSrc, uint skip) {
315     SYNTHESIZEP(CPP,STEREO,0,0,1,1);
316     }
317    
318     void SynthesizeFragment_mode54(VOICE &voice, uint samples, sample_t* pSrc, uint skip) {
319     SYNTHESIZEP(CPP,STEREO,0,1,0,0);
320     }
321    
322     void SynthesizeFragment_mode55(VOICE &voice, uint samples, sample_t* pSrc, uint skip) {
323     SYNTHESIZEP(CPP,STEREO,0,1,0,1);
324     }
325    
326     void SynthesizeFragment_mode56(VOICE &voice, uint samples, sample_t* pSrc, uint skip) {
327     SYNTHESIZEP(CPP,STEREO,0,1,1,0);
328     }
329    
330     void SynthesizeFragment_mode57(VOICE &voice, uint samples, sample_t* pSrc, uint skip) {
331     SYNTHESIZEP(CPP,STEREO,0,1,1,1);
332     }
333    
334     void SynthesizeFragment_mode59(VOICE &voice, uint samples, sample_t* pSrc, uint skip) {
335     SYNTHESIZEP(CPP,STEREO,1,0,0,1);
336     }
337    
338     void SynthesizeFragment_mode5b(VOICE &voice, uint samples, sample_t* pSrc, uint skip) {
339     SYNTHESIZEP(CPP,STEREO,1,0,1,1);
340     }
341    
342     void SynthesizeFragment_mode5c(VOICE &voice, uint samples, sample_t* pSrc, uint skip) {
343     SYNTHESIZEP(CPP,STEREO,1,1,0,0);
344     }
345    
346     void SynthesizeFragment_mode5d(VOICE &voice, uint samples, sample_t* pSrc, uint skip) {
347     SYNTHESIZEP(CPP,STEREO,1,1,0,1);
348     }
349    
350     void SynthesizeFragment_mode5e(VOICE &voice, uint samples, sample_t* pSrc, uint skip) {
351     SYNTHESIZEP(CPP,STEREO,1,1,1,0);
352     }
353    
354     void SynthesizeFragment_mode5f(VOICE &voice, uint samples, sample_t* pSrc, uint skip) {
355     SYNTHESIZEP(CPP,STEREO,1,1,1,1);
356     }
357    
358 schoenebeck 328 #if ARCH_X86
359    
360 senkov 325 void SynthesizeFragment_mode61(VOICE &voice, uint samples, sample_t* pSrc, uint skip) {
361     SYNTHESIZEP(ASM_X86_MMX_SSE,MONO,0,0,0,1);
362     }
363    
364     void SynthesizeFragment_mode63(VOICE &voice, uint samples, sample_t* pSrc, uint skip) {
365     SYNTHESIZEP(ASM_X86_MMX_SSE,MONO,0,0,1,1);
366     }
367    
368     void SynthesizeFragment_mode64(VOICE &voice, uint samples, sample_t* pSrc, uint skip) {
369     SYNTHESIZEP(ASM_X86_MMX_SSE,MONO,0,1,0,0);
370     }
371    
372     void SynthesizeFragment_mode65(VOICE &voice, uint samples, sample_t* pSrc, uint skip) {
373     SYNTHESIZEP(ASM_X86_MMX_SSE,MONO,0,1,0,1);
374     }
375    
376     void SynthesizeFragment_mode66(VOICE &voice, uint samples, sample_t* pSrc, uint skip) {
377     SYNTHESIZEP(ASM_X86_MMX_SSE,MONO,0,1,1,0);
378     }
379    
380     void SynthesizeFragment_mode67(VOICE &voice, uint samples, sample_t* pSrc, uint skip) {
381     SYNTHESIZEP(ASM_X86_MMX_SSE,MONO,0,1,1,1);
382     }
383    
384     void SynthesizeFragment_mode69(VOICE &voice, uint samples, sample_t* pSrc, uint skip) {
385     SYNTHESIZEP(ASM_X86_MMX_SSE,MONO,1,0,0,1);
386     }
387    
388     void SynthesizeFragment_mode6b(VOICE &voice, uint samples, sample_t* pSrc, uint skip) {
389     SYNTHESIZEP(ASM_X86_MMX_SSE,MONO,1,0,1,1);
390     }
391    
392     void SynthesizeFragment_mode6c(VOICE &voice, uint samples, sample_t* pSrc, uint skip) {
393     SYNTHESIZEP(ASM_X86_MMX_SSE,MONO,1,1,0,0);
394     }
395    
396     void SynthesizeFragment_mode6d(VOICE &voice, uint samples, sample_t* pSrc, uint skip) {
397     SYNTHESIZEP(ASM_X86_MMX_SSE,MONO,1,1,0,1);
398     }
399    
400     void SynthesizeFragment_mode6e(VOICE &voice, uint samples, sample_t* pSrc, uint skip) {
401     SYNTHESIZEP(ASM_X86_MMX_SSE,MONO,1,1,1,0);
402     }
403    
404     void SynthesizeFragment_mode6f(VOICE &voice, uint samples, sample_t* pSrc, uint skip) {
405     SYNTHESIZEP(ASM_X86_MMX_SSE,MONO,1,1,1,1);
406     }
407    
408     void SynthesizeFragment_mode71(VOICE &voice, uint samples, sample_t* pSrc, uint skip) {
409     SYNTHESIZEP(ASM_X86_MMX_SSE,STEREO,0,0,0,1);
410     }
411    
412     void SynthesizeFragment_mode73(VOICE &voice, uint samples, sample_t* pSrc, uint skip) {
413     SYNTHESIZEP(ASM_X86_MMX_SSE,STEREO,0,0,1,1);
414     }
415    
416     void SynthesizeFragment_mode74(VOICE &voice, uint samples, sample_t* pSrc, uint skip) {
417     SYNTHESIZEP(ASM_X86_MMX_SSE,STEREO,0,1,0,0);
418     }
419    
420     void SynthesizeFragment_mode75(VOICE &voice, uint samples, sample_t* pSrc, uint skip) {
421     SYNTHESIZEP(ASM_X86_MMX_SSE,STEREO,0,1,0,1);
422     }
423    
424     void SynthesizeFragment_mode76(VOICE &voice, uint samples, sample_t* pSrc, uint skip) {
425     SYNTHESIZEP(ASM_X86_MMX_SSE,STEREO,0,1,1,0);
426     }
427    
428     void SynthesizeFragment_mode77(VOICE &voice, uint samples, sample_t* pSrc, uint skip) {
429     SYNTHESIZEP(ASM_X86_MMX_SSE,STEREO,0,1,1,1);
430     }
431    
432     void SynthesizeFragment_mode79(VOICE &voice, uint samples, sample_t* pSrc, uint skip) {
433     SYNTHESIZEP(ASM_X86_MMX_SSE,STEREO,1,0,0,1);
434     }
435    
436     void SynthesizeFragment_mode7b(VOICE &voice, uint samples, sample_t* pSrc, uint skip) {
437     SYNTHESIZEP(ASM_X86_MMX_SSE,STEREO,1,0,1,1);
438     }
439    
440     void SynthesizeFragment_mode7c(VOICE &voice, uint samples, sample_t* pSrc, uint skip) {
441     SYNTHESIZEP(ASM_X86_MMX_SSE,STEREO,1,1,0,0);
442     }
443    
444     void SynthesizeFragment_mode7d(VOICE &voice, uint samples, sample_t* pSrc, uint skip) {
445     SYNTHESIZEP(ASM_X86_MMX_SSE,STEREO,1,1,0,1);
446     }
447    
448     void SynthesizeFragment_mode7e(VOICE &voice, uint samples, sample_t* pSrc, uint skip) {
449     SYNTHESIZEP(ASM_X86_MMX_SSE,STEREO,1,1,1,0);
450     }
451    
452     void SynthesizeFragment_mode7f(VOICE &voice, uint samples, sample_t* pSrc, uint skip) {
453     SYNTHESIZEP(ASM_X86_MMX_SSE,STEREO,1,1,1,1);
454     }
455    
456 schoenebeck 328 #endif // ARCH_X86
457    
458 schoenebeck 320 void* GetSynthesisFunction(const int SynthesisMode) {
459     // Mode Bits: IMPL,CHAN,FILT,INTERP,LOOP,CONSTPITCH
460     switch (SynthesisMode) {
461 senkov 325 case 0x00: // redundant
462     case 0x01: return (void*) SynthesizeFragment_mode01;
463     case 0x02: // redundant
464     case 0x03: return (void*) SynthesizeFragment_mode03;
465     case 0x04: return (void*) SynthesizeFragment_mode04;
466     case 0x05: return (void*) SynthesizeFragment_mode05;
467     case 0x06: return (void*) SynthesizeFragment_mode06;
468     case 0x07: return (void*) SynthesizeFragment_mode07;
469     case 0x08: // redundant
470     case 0x09: return (void*) SynthesizeFragment_mode09;
471     case 0x0a: // redundant
472     case 0x0b: return (void*) SynthesizeFragment_mode0b;
473     case 0x0c: return (void*) SynthesizeFragment_mode0c;
474     case 0x0d: return (void*) SynthesizeFragment_mode0d;
475     case 0x0e: return (void*) SynthesizeFragment_mode0e;
476     case 0x0f: return (void*) SynthesizeFragment_mode0f;
477     case 0x10: // redundant
478     case 0x11: return (void*) SynthesizeFragment_mode11;
479     case 0x12: // redundant
480     case 0x13: return (void*) SynthesizeFragment_mode13;
481     case 0x14: return (void*) SynthesizeFragment_mode14;
482     case 0x15: return (void*) SynthesizeFragment_mode15;
483     case 0x16: return (void*) SynthesizeFragment_mode16;
484     case 0x17: return (void*) SynthesizeFragment_mode17;
485     case 0x18: // redundant
486     case 0x19: return (void*) SynthesizeFragment_mode19;
487     case 0x1a: // redundant
488     case 0x1b: return (void*) SynthesizeFragment_mode1b;
489     case 0x1c: return (void*) SynthesizeFragment_mode1c;
490     case 0x1d: return (void*) SynthesizeFragment_mode1d;
491     case 0x1e: return (void*) SynthesizeFragment_mode1e;
492     case 0x1f: return (void*) SynthesizeFragment_mode1f;
493 schoenebeck 328 #if ARCH_X86
494 senkov 325 case 0x20: // redundant
495     case 0x21: return (void*) SynthesizeFragment_mode21;
496     case 0x22: // redundant
497     case 0x23: return (void*) SynthesizeFragment_mode23;
498     case 0x24: return (void*) SynthesizeFragment_mode24;
499     case 0x25: return (void*) SynthesizeFragment_mode25;
500     case 0x26: return (void*) SynthesizeFragment_mode26;
501     case 0x27: return (void*) SynthesizeFragment_mode27;
502     case 0x28: // redundant
503     case 0x29: return (void*) SynthesizeFragment_mode29;
504     case 0x2a: // redundant
505     case 0x2b: return (void*) SynthesizeFragment_mode2b;
506     case 0x2c: return (void*) SynthesizeFragment_mode2c;
507     case 0x2d: return (void*) SynthesizeFragment_mode2d;
508     case 0x2e: return (void*) SynthesizeFragment_mode2e;
509     case 0x2f: return (void*) SynthesizeFragment_mode2f;
510     case 0x30: // redundant
511     case 0x31: return (void*) SynthesizeFragment_mode31;
512     case 0x32: // redundant
513     case 0x33: return (void*) SynthesizeFragment_mode33;
514     case 0x34: return (void*) SynthesizeFragment_mode34;
515     case 0x35: return (void*) SynthesizeFragment_mode35;
516     case 0x36: return (void*) SynthesizeFragment_mode36;
517     case 0x37: return (void*) SynthesizeFragment_mode37;
518     case 0x38: // redundant
519     case 0x39: return (void*) SynthesizeFragment_mode39;
520     case 0x3a: // redundant
521     case 0x3b: return (void*) SynthesizeFragment_mode3b;
522     case 0x3c: return (void*) SynthesizeFragment_mode3c;
523     case 0x3d: return (void*) SynthesizeFragment_mode3d;
524     case 0x3e: return (void*) SynthesizeFragment_mode3e;
525     case 0x3f: return (void*) SynthesizeFragment_mode3f;
526 schoenebeck 328 #endif // ARCH_X86
527 senkov 325
528     //these are the same with performance monitoring
529     case 0x40: // redundant
530     case 0x41: return (void*) SynthesizeFragment_mode41;
531     case 0x42: // redundant
532     case 0x43: return (void*) SynthesizeFragment_mode43;
533     case 0x44: return (void*) SynthesizeFragment_mode44;
534     case 0x45: return (void*) SynthesizeFragment_mode45;
535     case 0x46: return (void*) SynthesizeFragment_mode46;
536     case 0x47: return (void*) SynthesizeFragment_mode47;
537     case 0x48: // redundant
538     case 0x49: return (void*) SynthesizeFragment_mode49;
539     case 0x4a: // redundant
540     case 0x4b: return (void*) SynthesizeFragment_mode4b;
541     case 0x4c: return (void*) SynthesizeFragment_mode4c;
542     case 0x4d: return (void*) SynthesizeFragment_mode4d;
543     case 0x4e: return (void*) SynthesizeFragment_mode4e;
544     case 0x4f: return (void*) SynthesizeFragment_mode4f;
545     case 0x50: // redundant
546     case 0x51: return (void*) SynthesizeFragment_mode51;
547     case 0x52: // redundant
548     case 0x53: return (void*) SynthesizeFragment_mode53;
549     case 0x54: return (void*) SynthesizeFragment_mode54;
550     case 0x55: return (void*) SynthesizeFragment_mode55;
551     case 0x56: return (void*) SynthesizeFragment_mode56;
552     case 0x57: return (void*) SynthesizeFragment_mode57;
553     case 0x58: // redundant
554     case 0x59: return (void*) SynthesizeFragment_mode59;
555     case 0x5a: // redundant
556     case 0x5b: return (void*) SynthesizeFragment_mode5b;
557     case 0x5c: return (void*) SynthesizeFragment_mode5c;
558     case 0x5d: return (void*) SynthesizeFragment_mode5d;
559     case 0x5e: return (void*) SynthesizeFragment_mode5e;
560     case 0x5f: return (void*) SynthesizeFragment_mode5f;
561 schoenebeck 328 #if ARCH_X86
562 senkov 325 case 0x60: // redundant
563     case 0x61: return (void*) SynthesizeFragment_mode61;
564     case 0x62: // redundant
565     case 0x63: return (void*) SynthesizeFragment_mode63;
566     case 0x64: return (void*) SynthesizeFragment_mode64;
567     case 0x65: return (void*) SynthesizeFragment_mode65;
568     case 0x66: return (void*) SynthesizeFragment_mode66;
569     case 0x67: return (void*) SynthesizeFragment_mode67;
570     case 0x68: // redundant
571     case 0x69: return (void*) SynthesizeFragment_mode69;
572     case 0x6a: // redundant
573     case 0x6b: return (void*) SynthesizeFragment_mode6b;
574     case 0x6c: return (void*) SynthesizeFragment_mode6c;
575     case 0x6d: return (void*) SynthesizeFragment_mode6d;
576     case 0x6e: return (void*) SynthesizeFragment_mode6e;
577     case 0x6f: return (void*) SynthesizeFragment_mode6f;
578     case 0x70: // redundant
579     case 0x71: return (void*) SynthesizeFragment_mode71;
580     case 0x72: // redundant
581     case 0x73: return (void*) SynthesizeFragment_mode73;
582     case 0x74: return (void*) SynthesizeFragment_mode74;
583     case 0x75: return (void*) SynthesizeFragment_mode75;
584     case 0x76: return (void*) SynthesizeFragment_mode76;
585     case 0x77: return (void*) SynthesizeFragment_mode77;
586     case 0x78: // redundant
587     case 0x79: return (void*) SynthesizeFragment_mode79;
588     case 0x7a: // redundant
589     case 0x7b: return (void*) SynthesizeFragment_mode7b;
590     case 0x7c: return (void*) SynthesizeFragment_mode7c;
591     case 0x7d: return (void*) SynthesizeFragment_mode7d;
592     case 0x7e: return (void*) SynthesizeFragment_mode7e;
593     case 0x7f: return (void*) SynthesizeFragment_mode7f;
594 schoenebeck 328 #endif // ARCH_X86
595 schoenebeck 320 default: {
596     printf("gig::Synthesizer: Invalid Synthesis Mode: %d\n", SynthesisMode);
597     exit(-1);
598     }
599     }
600     }
601    
602 senkov 325 void RunSynthesisFunction(const int SynthesisMode, VOICE& voice, uint Samples, sample_t* pSrc, uint Skip)
603     {
604     SynthesizeFragment_Fn* f = (SynthesizeFragment_Fn*) GetSynthesisFunction(SynthesisMode);
605     f(voice, Samples, pSrc, Skip);
606     }
607 schoenebeck 328
608 schoenebeck 320 }} // namespace LinuxSampler::gig

  ViewVC Help
Powered by ViewVC