48 lines
1.9 KiB
Diff
48 lines
1.9 KiB
Diff
# --- T2-COPYRIGHT-NOTE-BEGIN ---
|
|
# T2 SDE: package/*/libldac/big-endian.patch
|
|
# Copyright (C) 2024 The T2 SDE Project
|
|
#
|
|
# This Copyright note is generated by scripts/Create-CopyPatch,
|
|
# more information can be found in the files COPYING and README.
|
|
#
|
|
# This patch file is dual-licensed. It is available under the license the
|
|
# patched project is licensed under, as long as it is an OpenSource license
|
|
# as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
|
|
# of the GNU General Public License version 2 as used by the T2 SDE.
|
|
# --- T2-COPYRIGHT-NOTE-END ---
|
|
|
|
--- ldacBT/libldac/src/ldacBT_internal.c.vanilla 2024-08-29 16:04:25.883334391 +0200
|
|
+++ ldacBT/libldac/src/ldacBT_internal.c 2024-08-29 16:06:06.053334677 +0200
|
|
@@ -248,7 +248,16 @@
|
|
p_pcm_8+=3;
|
|
}
|
|
#else /* __BYTE_ORDER */
|
|
-#error unsupported byte order
|
|
+ for (i = 0; i < nsmpl; i++) {
|
|
+ *p_lch_8++ = p_pcm_8[2];
|
|
+ *p_lch_8++ = p_pcm_8[1];
|
|
+ *p_lch_8++ = p_pcm_8[0];
|
|
+ p_pcm_8+=3;
|
|
+ *p_rch_8++ = p_pcm_8[2];
|
|
+ *p_rch_8++ = p_pcm_8[1];
|
|
+ *p_rch_8++ = p_pcm_8[0];
|
|
+ p_pcm_8+=3;
|
|
+ }
|
|
#endif /* #if __BYTE_ORDER == __LITTLE_ENDIAN */
|
|
}
|
|
else if ( fmt == LDACBT_SMPL_FMT_S32 ){
|
|
@@ -263,7 +272,12 @@
|
|
p_pcm_8+=4;
|
|
}
|
|
#else /* __BYTE_ORDER */
|
|
-#error unsupported byte order
|
|
+ for (i = 0; i < nsmpl; i++) {
|
|
+ *p_lch_8++ = p_pcm_8[3]; *p_lch_8++ = p_pcm_8[2]; *p_lch_8++ = p_pcm_8[1]; *p_lch_8++ = p_pcm_8[0];
|
|
+ p_pcm_8+=4;
|
|
+ *p_rch_8++ = p_pcm_8[3]; *p_rch_8++ = p_pcm_8[2]; *p_rch_8++ = p_pcm_8[1]; *p_rch_8++ = p_pcm_8[3];
|
|
+ p_pcm_8+=4;
|
|
+ }
|
|
#endif /* #if __BYTE_ORDER == __LITTLE_ENDIAN */
|
|
}
|
|
else if ( fmt == LDACBT_SMPL_FMT_F32 ){
|