# HG changeset patch # User Matti Hamalainen # Date 1056228661 0 # Node ID 3518ca5c8b0f18254f470a808ec2dc72e36d72a6 # Parent 9f3b5e7a0c1564971bfa3f3148168dde5ddf1a46 Support for compile-time big/little-endian optimizations in audio output diff -r 9f3b5e7a0c15 -r 3518ca5c8b0f src/xmms-sid.cc --- 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 diff -r 9f3b5e7a0c15 -r 3518ca5c8b0f src/xs_support.c --- a/src/xs_support.c Sat Jun 21 20:50:02 2003 +0000 +++ b/src/xs_support.c Sat Jun 21 20:51:01 2003 +0000 @@ -20,7 +20,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include "xmms-sid.h" +#include "xs_support.h" #include #include #include diff -r 9f3b5e7a0c15 -r 3518ca5c8b0f src/xs_support.h --- a/src/xs_support.h Sat Jun 21 20:50:02 2003 +0000 +++ b/src/xs_support.h Sat Jun 21 20:51:01 2003 +0000 @@ -5,7 +5,7 @@ extern "C" { #endif -#include +#include "xmms-sid.h" /* * Functions