Mercurial > hg > xmms-sid
diff src/xmms-sid.cc @ 49:3518ca5c8b0f
Support for compile-time big/little-endian optimizations in audio output
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Sat, 21 Jun 2003 20:51:01 +0000 |
parents | 84214a409d19 |
children | 6a3ce7260ae1 |
line wrap: on
line diff
--- a/src/xmms-sid.cc Sat Jun 21 20:50:02 2003 +0000 +++ b/src/xmms-sid.cc Sat Jun 21 20:51:01 2003 +0000 @@ -226,7 +226,7 @@ pthread_mutex_unlock(&xs_mutex); - + /* Exit the playing thread */ XSDEBUG("exiting thread, bye.\n"); return NULL; } @@ -335,7 +335,11 @@ /* Configure rest of the emulation */ xs_emuConf.bitsPerSample = xs_cfg.fmtBitsPerSample; xs_emuConf.frequency = xs_cfg.fmtFrequency; +#ifdef HAVE_UNSIGNEDPCM + xs_emuConf.sampleFormat = SIDEMU_UNSIGNED_PCM; +#else xs_emuConf.sampleFormat = SIDEMU_SIGNED_PCM; +#endif xs_emuConf.mos8580 = xs_cfg.mos8580; xs_emuConf.emulateFilter = xs_cfg.emulateFilters; xs_emuConf.filterFs = xs_cfg.filterFs; @@ -425,6 +429,20 @@ xs_emuConf.sidDefault = SID2_MOS6581; xs_emuConf.sidSamples = emulation.sidSamples; +#ifdef HAVE_UNSIGNEDPCM +#ifdef WORDS_BIGENDIAN + xs_emuConf.sampleFormat = SID2_BIG_UNSIGNED; +#else + xs_emuConf.sampleFormat = SID2_LITTLE_UNSIGNED; +#endif +#else +#ifdef WORDS_BIGENDIAN + xs_emuConf.sampleFormat = SID2_BIG_SIGNED; +#else + xs_emuConf.sampleFormat = SID2_LITTLE_SIGNED; +#endif +#endif + /* Now set the emulator configuration */ xs_emuEngine.config(xs_emuConf); #endif