openal-soft: don't default to float output
authorGrazvydas Ignotas <notasas@gmail.com>
Wed, 2 Jul 2014 00:45:59 +0000 (03:45 +0300)
committerGrazvydas Ignotas <notasas@gmail.com>
Wed, 2 Jul 2014 00:45:59 +0000 (03:45 +0300)
we don't want performance hit from extra conversion in libasound

recipes/openal/openal-soft/default_to_short.patch [new file with mode: 0644]
recipes/openal/openal-soft_1.15.1.bb

diff --git a/recipes/openal/openal-soft/default_to_short.patch b/recipes/openal/openal-soft/default_to_short.patch
new file mode 100644 (file)
index 0000000..87d1612
--- /dev/null
@@ -0,0 +1,12 @@
+diff -ur openal-soft-1.15.1.orig/OpenAL32/Include/alMain.h openal-soft-1.15.1/OpenAL32/Include/alMain.h
+--- openal-soft-1.15.1.orig/OpenAL32/Include/alMain.h  2014-07-02 03:36:17.870323361 +0300
++++ openal-soft-1.15.1/OpenAL32/Include/alMain.h       2014-07-02 03:37:00.446324946 +0300
+@@ -502,7 +502,7 @@
+     DevFmtUInt   = ALC_UNSIGNED_INT_SOFT,
+     DevFmtFloat  = ALC_FLOAT_SOFT,
+-    DevFmtTypeDefault = DevFmtFloat
++    DevFmtTypeDefault = DevFmtShort
+ };
+ enum DevFmtChannels {
+     DevFmtMono   = ALC_MONO_SOFT,
index 81de6e7..077a258 100644 (file)
@@ -3,13 +3,19 @@ HOMEPAGE = "http://kcat.strangesoft.net/openal.html"
 LICENSE = "GPLv2"
 LIC_FILES_CHKSUM = "file://COPYING;md5=facc3a8f452930083bbb95d82b989c35"
 
+PR = "r1"
+
 inherit cmake
 
 DEPENDS = "${@base_contains('DISTRO_FEATURES', 'alsa', 'alsa-lib', '', d)} \
            ${@base_contains('DISTRO_FEATURES', 'pulseaudio', 'pulseaudio', '', d)} \
           "
 
-SRC_URI = "http://kcat.strangesoft.net/openal-releases/${PN}-${PV}.tar.bz2"
+SRC_URI = " \
+       http://kcat.strangesoft.net/openal-releases/${PN}-${PV}.tar.bz2 \
+       file://default_to_short.patch;patch=1 \
+"
+
 SRC_URI[md5sum] = "ea83dec3b9655a27d28e7bc7cae9cd71"
 SRC_URI[sha256sum] = "0e29a162f0841ccb4135ce76e92e8a704589b680a85eddf76f898de5236eb056"