Changeset View
Changeset View
Standalone View
Standalone View
www/firefox/files/patch-sample-type
# Let ports handle default sample type | # Let ports handle default sample type | ||||
--- old-configure.in~ | --- toolkit/moz.configure~ | ||||
+++ old-configure.in | +++ toolkit/moz.configure | ||||
@@ -5144,7 +5144,7 @@ dnl Use integers over floats for audio o | @@ -419,12 +419,11 @@ set_config('MOZ_FMP4', fmp4) | ||||
dnl (regarless of the CPU architecture, because audio | set_define('MOZ_FMP4', fmp4) | ||||
dnl backends for those platforms don't support floats. We also | add_old_configure_assignment('MOZ_FMP4', fmp4) | ||||
dnl use integers on ARM with other OS, because it's more efficient. | |||||
-if test "$OS_TARGET" = "Android" -o "$CPU_ARCH" = "arm"; then | -@depends(target) | ||||
+if test -n "$MOZ_INTEGER_SAMPLES"; then | -def sample_type_is_s16(target): | ||||
MOZ_SAMPLE_TYPE_S16=1 | - # Use integers over floats for audio on Android regardless of the CPU | ||||
AC_DEFINE(MOZ_SAMPLE_TYPE_S16) | - # architecture, because audio backends for Android don't support floats. | ||||
AC_SUBST(MOZ_SAMPLE_TYPE_S16) | - # We also use integers on ARM because it's more efficient. | ||||
- if target.os == 'Android' or target.cpu == 'arm': | |||||
+option(env='MOZ_INTEGER_SAMPLES', help='Enable signed 16-bit audio samples') | |||||
+@depends('MOZ_INTEGER_SAMPLES') | |||||
+def sample_type_is_s16(value): | |||||
+ enabled = bool(value) | |||||
+ if enabled: | |||||
return True | |||||
@depends(sample_type_is_s16) |