ReactOS Fundraising Campaign 2012
 
€ 4,410 / € 30,000

Information | Donate

Home | Info | Community | Development | myReactOS | Contact Us

  1. Home
  2. Community
  3. Development
  4. myReactOS
  5. Fundraiser 2012

  1. Main Page
  2. Alphabetical List
  3. Data Structures
  4. Directories
  5. File List
  6. Data Fields
  7. Globals
  8. Related Pages

ReactOS Development > Doxygen

synth.c
Go to the documentation of this file.
00001 /*
00002     synth.c: The functions for synthesizing samples, at the end of decoding.
00003 
00004     copyright 1995-2008 by the mpg123 project - free software under the terms of the LGPL 2.1
00005     see COPYING and AUTHORS files in distribution or http://mpg123.org
00006     initially written by Michael Hipp, heavily dissected and rearranged by Thomas Orgis
00007 */
00008 
00009 #include "mpg123lib_intern.h"
00010 #include "sample.h"
00011 #include "debug.h"
00012 
00013 /*
00014     Part 1: All synth functions that produce signed short.
00015     That is:
00016         - synth_1to1 with cpu-specific variants (synth_1to1_i386, synth_1to1_i586 ...)
00017         - synth_1to1_mono and synth_1to1_mono2stereo; which use fr->synths.plain[r_1to1][f_16].
00018     Nearly every decoder variant has it's own synth_1to1, while the mono conversion is shared.
00019 */
00020 
00021 #define SAMPLE_T short
00022 #define WRITE_SAMPLE(samples,sum,clip) WRITE_SHORT_SAMPLE(samples,sum,clip)
00023 
00024 /* Part 1a: All straight 1to1 decoding functions */
00025 #define BLOCK 0x40 /* One decoding block is 64 samples. */
00026 
00027 #define SYNTH_NAME synth_1to1
00028 #include "synth.h"
00029 #undef SYNTH_NAME
00030 
00031 /* Mono-related synths; they wrap over _some_ synth_1to1. */
00032 #define SYNTH_NAME       fr->synths.plain[r_1to1][f_16]
00033 #define MONO_NAME        synth_1to1_mono
00034 #define MONO2STEREO_NAME synth_1to1_mono2stereo
00035 #include "synth_mono.h"
00036 #undef SYNTH_NAME
00037 #undef MONO_NAME
00038 #undef MONO2STEREO_NAME
00039 
00040 /* Now we have possibly some special synth_1to1 ...
00041    ... they produce signed short; the mono functions defined above work on the special synths, too. */
00042 
00043 #ifdef OPT_GENERIC_DITHER
00044 #define SYNTH_NAME synth_1to1_dither
00045 /* We need the accurate sample writing... */
00046 #undef WRITE_SAMPLE
00047 #define WRITE_SAMPLE(samples,sum,clip) WRITE_SHORT_SAMPLE_ACCURATE(samples,sum,clip)
00048 
00049 #define USE_DITHER
00050 #include "synth.h"
00051 #undef USE_DITHER
00052 #undef SYNTH_NAME
00053 
00054 #undef WRITE_SAMPLE
00055 #define WRITE_SAMPLE(samples,sum,clip) WRITE_SHORT_SAMPLE(samples,sum,clip)
00056 
00057 #endif
00058 
00059 #ifdef OPT_X86
00060 /* The i386-specific C code, here as short variant, later 8bit and float. */
00061 #define NO_AUTOINCREMENT
00062 #define SYNTH_NAME synth_1to1_i386
00063 #include "synth.h"
00064 #undef SYNTH_NAME
00065 /* i386 uses the normal mono functions. */
00066 #undef NO_AUTOINCREMENT
00067 #endif
00068 
00069 #undef BLOCK /* Following functions are so special that they don't need this. */
00070 
00071 #ifdef OPT_I586
00072 /* This is defined in assembler. */
00073 int synth_1to1_i586_asm(real *bandPtr, int channel, unsigned char *out, unsigned char *buffs, int *bo, real *decwin);
00074 /* This is just a hull to use the mpg123 handle. */
00075 int synth_1to1_i586(real *bandPtr, int channel, mpg123_handle *fr, int final)
00076 {
00077     int ret;
00078     if(fr->have_eq_settings) do_equalizer(bandPtr,channel,fr->equalizer);
00079 
00080     ret = synth_1to1_i586_asm(bandPtr, channel, fr->buffer.data+fr->buffer.fill, fr->rawbuffs, &fr->bo, fr->decwin);
00081     if(final) fr->buffer.fill += 128;
00082     return ret;
00083 }
00084 #endif
00085 
00086 #ifdef OPT_I586_DITHER
00087 /* This is defined in assembler. */
00088 int synth_1to1_i586_asm_dither(real *bandPtr, int channel, unsigned char *out, unsigned char *buffs, int *bo, real *decwin, float *dithernoise);
00089 /* This is just a hull to use the mpg123 handle. */
00090 int synth_1to1_i586_dither(real *bandPtr, int channel, mpg123_handle *fr, int final)
00091 {
00092     int ret;
00093     int bo_dither[2]; /* Temporary workaround? Could expand the asm code. */
00094     if(fr->have_eq_settings) do_equalizer(bandPtr,channel,fr->equalizer);
00095 
00096     /* Applying this hack, to change the asm only bit by bit (adding dithernoise pointer). */
00097     bo_dither[0] = fr->bo;
00098     bo_dither[1] = fr->ditherindex;
00099     ret = synth_1to1_i586_asm_dither(bandPtr, channel, fr->buffer.data+fr->buffer.fill, fr->rawbuffs, bo_dither, fr->decwin, fr->dithernoise);
00100     fr->bo          = bo_dither[0];
00101     fr->ditherindex = bo_dither[1];
00102 
00103     if(final) fr->buffer.fill += 128;
00104     return ret;
00105 }
00106 #endif
00107 
00108 #ifdef OPT_3DNOW
00109 /* Those are defined in assembler. */
00110 void do_equalizer_3dnow(real *bandPtr,int channel, real equalizer[2][32]);
00111 int synth_1to1_3dnow_asm(real *bandPtr, int channel, unsigned char *out, unsigned char *buffs, int *bo, real *decwin);
00112 /* This is just a hull to use the mpg123 handle. */
00113 int synth_1to1_3dnow(real *bandPtr, int channel, mpg123_handle *fr, int final)
00114 {
00115     int ret;
00116 
00117     if(fr->have_eq_settings) do_equalizer_3dnow(bandPtr,channel,fr->equalizer);
00118 
00119     /* this is in asm, can be dither or not */
00120     /* uh, is this return from pointer correct? */ 
00121     ret = (int) synth_1to1_3dnow_asm(bandPtr, channel, fr->buffer.data+fr->buffer.fill, fr->rawbuffs, &fr->bo, fr->decwin);
00122     if(final) fr->buffer.fill += 128;
00123     return ret;
00124 }
00125 #endif
00126 
00127 #ifdef OPT_MMX
00128 /* This is defined in assembler. */
00129 int synth_1to1_MMX(real *bandPtr, int channel, short *out, short *buffs, int *bo, float *decwins);
00130 /* This is just a hull to use the mpg123 handle. */
00131 int synth_1to1_mmx(real *bandPtr, int channel, mpg123_handle *fr, int final)
00132 {
00133     if(fr->have_eq_settings) do_equalizer(bandPtr,channel,fr->equalizer);
00134 
00135     /* in asm */
00136     synth_1to1_MMX(bandPtr, channel, (short*) (fr->buffer.data+fr->buffer.fill), (short *) fr->rawbuffs, &fr->bo, fr->decwins);
00137     if(final) fr->buffer.fill += 128;
00138     return 0;
00139 }
00140 #endif
00141 
00142 #ifdef OPT_SSE
00143 #ifdef ACCURATE_ROUNDING
00144 /* This is defined in assembler. */
00145 int synth_1to1_sse_accurate_asm(real *window, real *b0, short *samples, int bo1);
00146 int synth_1to1_stereo_sse_accurate_asm(real *window, real *b0l, real *b0r, short *samples, int bo1);
00147 void dct64_real_sse(real *out0, real *out1, real *samples);
00148 /* This is just a hull to use the mpg123 handle. */
00149 int synth_1to1_sse(real *bandPtr,int channel, mpg123_handle *fr, int final)
00150 {
00151     short *samples = (short *) (fr->buffer.data+fr->buffer.fill);   
00152     real *b0, **buf;
00153     int clip; 
00154     int bo1;
00155 
00156     if(fr->have_eq_settings) do_equalizer(bandPtr,channel,fr->equalizer);
00157 
00158     if(!channel)
00159     {
00160         fr->bo--;
00161         fr->bo &= 0xf;
00162         buf = fr->real_buffs[0];
00163     }
00164     else
00165     {
00166         samples++;
00167         buf = fr->real_buffs[1];
00168     }
00169 
00170     if(fr->bo & 0x1) 
00171     {
00172         b0 = buf[0];
00173         bo1 = fr->bo;
00174         dct64_real_sse(buf[1]+((fr->bo+1)&0xf),buf[0]+fr->bo,bandPtr);
00175     }
00176     else
00177     {
00178         b0 = buf[1];
00179         bo1 = fr->bo+1;
00180         dct64_real_sse(buf[0]+fr->bo,buf[1]+fr->bo+1,bandPtr);
00181     }
00182 
00183     clip = synth_1to1_sse_accurate_asm(fr->decwin, b0, samples, bo1);
00184 
00185     if(final) fr->buffer.fill += 128;
00186 
00187     return clip;
00188 }
00189 
00190 int synth_1to1_stereo_sse(real *bandPtr_l, real *bandPtr_r, mpg123_handle *fr)
00191 {
00192     short *samples = (short *) (fr->buffer.data+fr->buffer.fill);
00193 
00194     real *b0l, *b0r, **bufl, **bufr;
00195     int bo1;
00196     int clip;
00197 
00198     if(fr->have_eq_settings)
00199     {
00200         do_equalizer(bandPtr_l,0,fr->equalizer);
00201         do_equalizer(bandPtr_r,1,fr->equalizer);
00202     }
00203 
00204     fr->bo--;
00205     fr->bo &= 0xf;
00206     bufl = fr->real_buffs[0];
00207     bufr = fr->real_buffs[1];
00208 
00209     if(fr->bo & 0x1)
00210     {
00211         b0l = bufl[0];
00212         b0r = bufr[0];
00213         bo1 = fr->bo;
00214         dct64_real_sse(bufl[1]+((fr->bo+1)&0xf),bufl[0]+fr->bo,bandPtr_l);
00215         dct64_real_sse(bufr[1]+((fr->bo+1)&0xf),bufr[0]+fr->bo,bandPtr_r);
00216     }
00217     else
00218     {
00219         b0l = bufl[1];
00220         b0r = bufr[1];
00221         bo1 = fr->bo+1;
00222         dct64_real_sse(bufl[0]+fr->bo,bufl[1]+fr->bo+1,bandPtr_l);
00223         dct64_real_sse(bufr[0]+fr->bo,bufr[1]+fr->bo+1,bandPtr_r);
00224     }
00225 
00226     clip = synth_1to1_stereo_sse_accurate_asm(fr->decwin, b0l, b0r, samples, bo1);
00227 
00228     fr->buffer.fill += 128;
00229 
00230     return clip;
00231 }
00232 #else
00233 /* This is defined in assembler. */
00234 void synth_1to1_sse_asm(real *bandPtr, int channel, short *samples, short *buffs, int *bo, real *decwin);
00235 /* This is just a hull to use the mpg123 handle. */
00236 int synth_1to1_sse(real *bandPtr, int channel, mpg123_handle *fr, int final)
00237 {
00238     if(fr->have_eq_settings) do_equalizer(bandPtr,channel,fr->equalizer);
00239 
00240     synth_1to1_sse_asm(bandPtr, channel, (short*) (fr->buffer.data+fr->buffer.fill), (short *) fr->rawbuffs, &fr->bo, fr->decwins);
00241     if(final) fr->buffer.fill += 128;
00242     return 0;
00243 }
00244 #endif
00245 #endif
00246 
00247 #ifdef OPT_3DNOWEXT
00248 /* This is defined in assembler. */
00249 void synth_1to1_3dnowext_asm(real *bandPtr, int channel, short *samples, short *buffs, int *bo, real *decwin);
00250 /* This is just a hull to use the mpg123 handle. */
00251 int synth_1to1_3dnowext(real *bandPtr, int channel, mpg123_handle *fr, int final)
00252 {
00253     if(fr->have_eq_settings) do_equalizer(bandPtr,channel,fr->equalizer);
00254 
00255     synth_1to1_3dnowext_asm(bandPtr, channel, (short*) (fr->buffer.data+fr->buffer.fill), (short *) fr->rawbuffs, &fr->bo, fr->decwins);
00256     if(final) fr->buffer.fill += 128;
00257     return 0;
00258 }
00259 #endif
00260 
00261 #ifdef OPT_X86_64
00262 #ifdef ACCURATE_ROUNDING
00263 /* Assembler routines. */
00264 int synth_1to1_x86_64_accurate_asm(real *window, real *b0, short *samples, int bo1);
00265 int synth_1to1_stereo_x86_64_accurate_asm(real *window, real *b0l, real *b0r, short *samples, int bo1);
00266 void dct64_real_x86_64(real *out0, real *out1, real *samples);
00267 /* Hull for C mpg123 API */
00268 int synth_1to1_x86_64(real *bandPtr,int channel, mpg123_handle *fr, int final)
00269 {
00270     short *samples = (short *) (fr->buffer.data+fr->buffer.fill);
00271 
00272     real *b0, **buf;
00273     int bo1;
00274     int clip;
00275 
00276     if(fr->have_eq_settings) do_equalizer(bandPtr,channel,fr->equalizer);
00277 
00278     if(!channel)
00279     {
00280         fr->bo--;
00281         fr->bo &= 0xf;
00282         buf = fr->real_buffs[0];
00283     }
00284     else
00285     {
00286         samples++;
00287         buf = fr->real_buffs[1];
00288     }
00289 
00290     if(fr->bo & 0x1)
00291     {
00292         b0 = buf[0];
00293         bo1 = fr->bo;
00294         dct64_real_x86_64(buf[1]+((fr->bo+1)&0xf),buf[0]+fr->bo,bandPtr);
00295     }
00296     else
00297     {
00298         b0 = buf[1];
00299         bo1 = fr->bo+1;
00300         dct64_real_x86_64(buf[0]+fr->bo,buf[1]+fr->bo+1,bandPtr);
00301     }
00302 
00303     clip = synth_1to1_x86_64_accurate_asm(fr->decwin, b0, samples, bo1);
00304 
00305     if(final) fr->buffer.fill += 128;
00306 
00307     return clip;
00308 }
00309 
00310 int synth_1to1_stereo_x86_64(real *bandPtr_l, real *bandPtr_r, mpg123_handle *fr)
00311 {
00312     short *samples = (short *) (fr->buffer.data+fr->buffer.fill);
00313 
00314     real *b0l, *b0r, **bufl, **bufr;
00315     int bo1;
00316     int clip;
00317 
00318     if(fr->have_eq_settings)
00319     {
00320         do_equalizer(bandPtr_l,0,fr->equalizer);
00321         do_equalizer(bandPtr_r,1,fr->equalizer);
00322     }
00323 
00324     fr->bo--;
00325     fr->bo &= 0xf;
00326     bufl = fr->real_buffs[0];
00327     bufr = fr->real_buffs[1];
00328 
00329     if(fr->bo & 0x1)
00330     {
00331         b0l = bufl[0];
00332         b0r = bufr[0];
00333         bo1 = fr->bo;
00334         dct64_real_x86_64(bufl[1]+((fr->bo+1)&0xf),bufl[0]+fr->bo,bandPtr_l);
00335         dct64_real_x86_64(bufr[1]+((fr->bo+1)&0xf),bufr[0]+fr->bo,bandPtr_r);
00336     }
00337     else
00338     {
00339         b0l = bufl[1];
00340         b0r = bufr[1];
00341         bo1 = fr->bo+1;
00342         dct64_real_x86_64(bufl[0]+fr->bo,bufl[1]+fr->bo+1,bandPtr_l);
00343         dct64_real_x86_64(bufr[0]+fr->bo,bufr[1]+fr->bo+1,bandPtr_r);
00344     }
00345 
00346     clip = synth_1to1_stereo_x86_64_accurate_asm(fr->decwin, b0l, b0r, samples, bo1);
00347 
00348     fr->buffer.fill += 128;
00349 
00350     return clip;
00351 }
00352 #else
00353 /* This is defined in assembler. */
00354 int synth_1to1_x86_64_asm(short *window, short *b0, short *samples, int bo1);
00355 int synth_1to1_stereo_x86_64_asm(short *window, short *b0l, short *b0r, short *samples, int bo1);
00356 void dct64_x86_64(short *out0, short *out1, real *samples);
00357 /* This is just a hull to use the mpg123 handle. */
00358 int synth_1to1_x86_64(real *bandPtr,int channel, mpg123_handle *fr, int final)
00359 {
00360     short *samples = (short *) (fr->buffer.data+fr->buffer.fill);   
00361     short *b0, **buf;
00362     int clip; 
00363     int bo1;
00364 
00365     if(fr->have_eq_settings) do_equalizer(bandPtr,channel,fr->equalizer);
00366 
00367     if(!channel)
00368     {
00369         fr->bo--;
00370         fr->bo &= 0xf;
00371         buf = fr->short_buffs[0];
00372     }
00373     else
00374     {
00375         samples++;
00376         buf = fr->short_buffs[1];
00377     }
00378 
00379     if(fr->bo & 0x1) 
00380     {
00381         b0 = buf[0];
00382         bo1 = fr->bo;
00383         dct64_x86_64(buf[1]+((fr->bo+1)&0xf),buf[0]+fr->bo,bandPtr);
00384     }
00385     else
00386     {
00387         b0 = buf[1];
00388         bo1 = fr->bo+1;
00389         dct64_x86_64(buf[0]+fr->bo,buf[1]+fr->bo+1,bandPtr);
00390     }
00391 
00392     clip = synth_1to1_x86_64_asm((short *)fr->decwins, b0, samples, bo1);
00393 
00394     if(final) fr->buffer.fill += 128;
00395 
00396     return clip;
00397 }
00398 
00399 int synth_1to1_stereo_x86_64(real *bandPtr_l,real *bandPtr_r, mpg123_handle *fr)
00400 {
00401     short *samples = (short *) (fr->buffer.data+fr->buffer.fill);
00402     short *b0l, *b0r, **bufl, **bufr;
00403     int clip; 
00404     int bo1;
00405 
00406     if(fr->have_eq_settings)
00407     {
00408         do_equalizer(bandPtr_l,0,fr->equalizer);
00409         do_equalizer(bandPtr_r,1,fr->equalizer);
00410     }
00411 
00412     fr->bo--;
00413     fr->bo &= 0xf;
00414     bufl = fr->short_buffs[0];
00415     bufr = fr->short_buffs[1];
00416 
00417     if(fr->bo & 0x1) 
00418     {
00419         b0l = bufl[0];
00420         b0r = bufr[0];
00421         bo1 = fr->bo;
00422         dct64_x86_64(bufl[1]+((fr->bo+1)&0xf),bufl[0]+fr->bo,bandPtr_l);
00423         dct64_x86_64(bufr[1]+((fr->bo+1)&0xf),bufr[0]+fr->bo,bandPtr_r);
00424     }
00425     else
00426     {
00427         b0l = bufl[1];
00428         b0r = bufr[1];
00429         bo1 = fr->bo+1;
00430         dct64_x86_64(bufl[0]+fr->bo,bufl[1]+fr->bo+1,bandPtr_l);
00431         dct64_x86_64(bufr[0]+fr->bo,bufr[1]+fr->bo+1,bandPtr_r);
00432     }
00433 
00434     clip = synth_1to1_stereo_x86_64_asm((short *)fr->decwins, b0l, b0r, samples, bo1);
00435 
00436     fr->buffer.fill += 128;
00437 
00438     return clip;
00439 }
00440 #endif
00441 #endif
00442 
00443 #ifdef OPT_ARM
00444 #ifdef ACCURATE_ROUNDING
00445 /* Assembler routines. */
00446 int synth_1to1_arm_accurate_asm(real *window, real *b0, short *samples, int bo1);
00447 /* Hull for C mpg123 API */
00448 int synth_1to1_arm(real *bandPtr,int channel, mpg123_handle *fr, int final)
00449 {
00450     short *samples = (short *) (fr->buffer.data+fr->buffer.fill);
00451 
00452     real *b0, **buf;
00453     int bo1;
00454     int clip;
00455 
00456     if(fr->have_eq_settings) do_equalizer(bandPtr,channel,fr->equalizer);
00457 
00458     if(!channel)
00459     {
00460         fr->bo--;
00461         fr->bo &= 0xf;
00462         buf = fr->real_buffs[0];
00463     }
00464     else
00465     {
00466         samples++;
00467         buf = fr->real_buffs[1];
00468     }
00469 
00470     if(fr->bo & 0x1)
00471     {
00472         b0 = buf[0];
00473         bo1 = fr->bo;
00474         dct64(buf[1]+((fr->bo+1)&0xf),buf[0]+fr->bo,bandPtr);
00475     }
00476     else
00477     {
00478         b0 = buf[1];
00479         bo1 = fr->bo+1;
00480         dct64(buf[0]+fr->bo,buf[1]+fr->bo+1,bandPtr);
00481     }
00482 
00483     clip = synth_1to1_arm_accurate_asm(fr->decwin, b0, samples, bo1);
00484 
00485     if(final) fr->buffer.fill += 128;
00486 
00487     return clip;
00488 }
00489 #else
00490 /* Assembler routines. */
00491 int synth_1to1_arm_asm(real *window, real *b0, short *samples, int bo1);
00492 /* Hull for C mpg123 API */
00493 int synth_1to1_arm(real *bandPtr,int channel, mpg123_handle *fr, int final)
00494 {
00495     short *samples = (short *) (fr->buffer.data+fr->buffer.fill);
00496 
00497     real *b0, **buf;
00498     int bo1;
00499     int clip;
00500 
00501     if(fr->have_eq_settings) do_equalizer(bandPtr,channel,fr->equalizer);
00502 
00503     if(!channel)
00504     {
00505         fr->bo--;
00506         fr->bo &= 0xf;
00507         buf = fr->real_buffs[0];
00508     }
00509     else
00510     {
00511         samples++;
00512         buf = fr->real_buffs[1];
00513     }
00514 
00515     if(fr->bo & 0x1)
00516     {
00517         b0 = buf[0];
00518         bo1 = fr->bo;
00519         dct64(buf[1]+((fr->bo+1)&0xf),buf[0]+fr->bo,bandPtr);
00520     }
00521     else
00522     {
00523         b0 = buf[1];
00524         bo1 = fr->bo+1;
00525         dct64(buf[0]+fr->bo,buf[1]+fr->bo+1,bandPtr);
00526     }
00527 
00528     clip = synth_1to1_arm_asm(fr->decwin, b0, samples, bo1);
00529 
00530     if(final) fr->buffer.fill += 128;
00531 
00532     return clip;
00533 }
00534 #endif
00535 #endif
00536 
00537 #ifndef NO_DOWNSAMPLE
00538 
00539 /*
00540     Part 1b: 2to1 synth.
00541     Only generic and i386 functions this time.
00542 */
00543 #define BLOCK 0x20 /* One decoding block is 32 samples. */
00544 
00545 #define SYNTH_NAME synth_2to1
00546 #include "synth.h"
00547 #undef SYNTH_NAME
00548 
00549 #ifdef OPT_DITHER /* Used for generic_dither and as fallback for i586_dither. */
00550 #define SYNTH_NAME synth_2to1_dither
00551 #define USE_DITHER
00552 #include "synth.h"
00553 #undef USE_DITHER
00554 #undef SYNTH_NAME
00555 #endif
00556 
00557 #define SYNTH_NAME       fr->synths.plain[r_2to1][f_16]
00558 #define MONO_NAME        synth_2to1_mono
00559 #define MONO2STEREO_NAME synth_2to1_mono2stereo
00560 #include "synth_mono.h"
00561 #undef SYNTH_NAME
00562 #undef MONO_NAME
00563 #undef MONO2STEREO_NAME
00564 
00565 #ifdef OPT_X86
00566 #define NO_AUTOINCREMENT
00567 #define SYNTH_NAME synth_2to1_i386
00568 #include "synth.h"
00569 #undef SYNTH_NAME
00570 /* i386 uses the normal mono functions. */
00571 #undef NO_AUTOINCREMENT
00572 #endif
00573 
00574 #undef BLOCK
00575 
00576 /*
00577     Part 1c: 4to1 synth.
00578     Same procedure as above...
00579 */
00580 #define BLOCK 0x10 /* One decoding block is 16 samples. */
00581 
00582 #define SYNTH_NAME synth_4to1
00583 #include "synth.h"
00584 #undef SYNTH_NAME
00585 
00586 #ifdef OPT_DITHER
00587 #define SYNTH_NAME synth_4to1_dither
00588 #define USE_DITHER
00589 #include "synth.h"
00590 #undef USE_DITHER
00591 #undef SYNTH_NAME
00592 #endif
00593 
00594 #define SYNTH_NAME       fr->synths.plain[r_4to1][f_16] /* This is just for the _i386 one... gotta check if it is really useful... */
00595 #define MONO_NAME        synth_4to1_mono
00596 #define MONO2STEREO_NAME synth_4to1_mono2stereo
00597 #include "synth_mono.h"
00598 #undef SYNTH_NAME
00599 #undef MONO_NAME
00600 #undef MONO2STEREO_NAME
00601 
00602 #ifdef OPT_X86
00603 #define NO_AUTOINCREMENT
00604 #define SYNTH_NAME synth_4to1_i386
00605 #include "synth.h"
00606 #undef SYNTH_NAME
00607 /* i386 uses the normal mono functions. */
00608 #undef NO_AUTOINCREMENT
00609 #endif
00610 
00611 #undef BLOCK
00612 
00613 #endif /* NO_DOWNSAMPLE */
00614 
00615 #ifndef NO_NTOM
00616 /*
00617     Part 1d: ntom synth.
00618     Same procedure as above... Just no extra play anymore, straight synth that uses the plain dct64.
00619 */
00620 
00621 /* These are all in one header, there's no flexibility to gain. */
00622 #define SYNTH_NAME       synth_ntom
00623 #define MONO_NAME        synth_ntom_mono
00624 #define MONO2STEREO_NAME synth_ntom_mono2stereo
00625 #include "synth_ntom.h"
00626 #undef SYNTH_NAME
00627 #undef MONO_NAME
00628 #undef MONO2STEREO_NAME
00629 
00630 #endif
00631 
00632 /* Done with short output. */
00633 #undef SAMPLE_T
00634 #undef WRITE_SAMPLE

Generated on Sun May 27 2012 04:34:10 for ReactOS by doxygen 1.7.6.1

ReactOS is a registered trademark or a trademark of ReactOS Foundation in the United States and other countries.