Index: src/inputPlugins/wavpack_plugin.c
===================================================================
--- src/inputPlugins/wavpack_plugin.c	(revision 6653)
+++ src/inputPlugins/wavpack_plugin.c	(working copy)
@@ -79,24 +79,41 @@
 			break;
 		case 2:
 			while (samcnt--) {
-				*dst++ = (uchar)(temp = *src++);
+				temp = *src++;
+#ifdef WORDS_BIGENDIAN
 				*dst++ = (uchar)(temp >> 8);
+				*dst++ = (uchar)(temp); 
+#else
+				*dst++ = (uchar)(temp); 
+				*dst++ = (uchar)(temp >> 8);
+#endif
 			}
 			break;
 		case 3:
 			/* downscale to 16 bits */
 			while (samcnt--) {
 				temp = *src++;
+#ifdef WORDS_BIGENDIAN
+				*dst++ = (uchar)(temp >> 16);
 				*dst++ = (uchar)(temp >> 8);
+#else
+				*dst++ = (uchar)(temp >> 8);
 				*dst++ = (uchar)(temp >> 16);
+#endif
 			}
 			break;
 		case 4:
 			/* downscale to 16 bits */
 			while (samcnt--) {
 				temp = *src++;
+#ifdef WORDS_BIGENDIAN
+				*dst++ = (uchar)(temp >> 24);
 				*dst++ = (uchar)(temp >> 16);
+
+#else
+				*dst++ = (uchar)(temp >> 16);
 				*dst++ = (uchar)(temp >> 24);
+#endif
 			}
 			break;
 	}

