changeset 61:a69b14abbc65 trunk

[svn] - conversion tables
author nenolod
date Sat, 30 Sep 2006 21:33:57 -0700
parents 34f76b8969bd
children 4a352dd2a91c
files ChangeLog src/CoreAudio/audio.c
diffstat 2 files changed, 37 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Sat Sep 30 21:30:12 2006 -0700
+++ b/ChangeLog	Sat Sep 30 21:33:57 2006 -0700
@@ -1,3 +1,11 @@
+2006-10-01 04:30:12 +0000  William Pitcock <nenolod@nenolod.net>
+  revision [120]
+  - use xconvert to swap endianness if necessary (LE -> BE, vice versa)
+  
+  trunk/src/CoreAudio/audio.c |    8 ++++++++
+  1 file changed, 8 insertions(+)
+
+
 2006-10-01 04:19:52 +0000  William Pitcock <nenolod@nenolod.net>
   revision [118]
   - tell audacious that playback is starting when we open an alac file
--- a/src/CoreAudio/audio.c	Sat Sep 30 21:30:12 2006 -0700
+++ b/src/CoreAudio/audio.c	Sat Sep 30 21:33:57 2006 -0700
@@ -100,6 +100,34 @@
 
 	switch (fmt)
 	{
+		case FMT_U16_LE:
+#ifdef WORDS_BIGENDIAN
+			format = FMT_U16_BE;
+#else
+			format = FMT_U16_LE;
+#endif
+			break;
+		case FMT_U16_BE:
+#ifdef WORDS_BIGENDIAN
+			format = FMT_U16_LE;
+#else
+			format = FMT_U16_BE;
+#endif
+			break;
+		case FMT_S16_LE:
+#ifdef WORDS_BIGENDIAN
+			format = FMT_S16_BE;
+#else
+			format = FMT_S16_LE;
+#endif
+			break;
+		case FMT_S16_BE:
+#ifdef WORDS_BIGENDIAN
+			format = FMT_S16_LE;
+#else
+			format = FMT_S16_BE;
+#endif
+			break;
 		case FMT_U16_NE:
 #ifdef WORDS_BIGENDIAN
 			format = FMT_U16_BE;
@@ -227,9 +255,7 @@
 
 	osx_set_audio_params();
 
-    osx_convert_func =
-        osx_get_convert_func(output.format.osx,
-                             osx_get_format(effect.format.xmms));
+        osx_convert_func = osx_get_convert_func(fmt, output.format.osx);
 
 	output.bps = osx_calc_bitrate(output.format.osx, output.frequency,output.channels);
 }