summaryrefslogtreecommitdiff
blob: 60cc3aa818c1abdab1057090041ef1052e1eec0e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
Index: audio.c
===================================================================
--- audio.c	(revision 1882)
+++ audio.c	(working copy)
@@ -229,8 +229,13 @@
 
 	assert (best != 0);
 
-	if (!(best & (SFMT_S8 | SFMT_U8)))
-		best |= req_with_endian & SFMT_MASK_ENDIANES;
+	if (!(best & (SFMT_S8 | SFMT_U8))) {
+		if ((formats_with_endian & SFMT_LE)
+				&& (formats_with_endian & SFMT_BE))
+			best |= SFMT_NE;
+		else
+			best |= formats_with_endian & SFMT_MASK_ENDIANES;
+	}
 
 	debug ("Choosed %s as the best matching %s",
 			sfmt_str(best, fmt_name1, sizeof(fmt_name1)),