Skip to content
Snippets Groups Projects
Commit 545e293a authored by Vittorio Giovara's avatar Vittorio Giovara Committed by Tristan Matthews
Browse files

contrib: add samplerate rules and patches

Based on VideoLan code by Jean-Baptiste Kempf et al.
Refs: #46617

Change-Id: I63e23a3df10e1f0050e0e9fec09fcdb92c6658b1
parent 417229f1
No related branches found
No related tags found
No related merge requests found
85d93df24d9d62e7803a5d0ac5d268b2085214adcb160e32fac316b12ee8a0ce36ccfb433a3c0a08f6e3ec418a5962bdb84f8a11262286a9b347436983029a7d libsamplerate-0.1.8.tar.gz
--- a/examples/audio_out.c.orig 2014-06-26 21:09:44.000000000 -0400
+++ b/examples/audio_out.c 2014-06-26 21:09:58.000000000 -0400
@@ -172,7 +172,6 @@
#if (defined (__MACH__) && defined (__APPLE__)) /* MacOSX */
-#include <Carbon.h>
#include <CoreAudio/AudioHardware.h>
#define MACOSX_MAGIC MAKE_MAGIC ('M', 'a', 'c', ' ', 'O', 'S', ' ', 'X')
# SAMPLERATE
SAMPLERATE_VERSION := 0.1.8
SAMPLERATE_URL := http://www.mega-nerd.com/SRC/libsamplerate-$(SAMPLERATE_VERSION).tar.gz
PKGS += samplerate
ifeq ($(call need_pkg,"samplerate"),)
PKGS_FOUND += samplerate
endif
$(TARBALLS)/libsamplerate-$(SAMPLERATE_VERSION).tar.gz:
$(call download,$(SAMPLERATE_URL))
.sum-samplerate: libsamplerate-$(SAMPLERATE_VERSION).tar.gz
samplerate: libsamplerate-$(SAMPLERATE_VERSION).tar.gz .sum-samplerate
$(UNPACK)
$(APPLY) $(SRC)/samplerate/soundcard.patch
$(APPLY) $(SRC)/samplerate/carbon.patch
$(UPDATE_AUTOCONFIG) && cd $(UNPACK_DIR) && mv config.guess config.sub Cfg
$(MOVE)
.samplerate: samplerate
cd $< && $(HOSTVARS) ./configure $(HOSTCONF)
cd $< && $(MAKE) install
touch $@
--- a/examples/audio_out.c.orig 2014-06-18 16:52:04.269479958 -0400
+++ b/examples/audio_out.c 2014-06-18 16:52:36.789478998 -0400
@@ -44,7 +44,11 @@
#include <fcntl.h>
#include <sys/ioctl.h>
+#if defined (__ANDROID__)
+#include <linux/soundcard.h>
+#else
#include <sys/soundcard.h>
+#endif
#define LINUX_MAGIC MAKE_MAGIC ('L', 'i', 'n', 'u', 'x', 'O', 'S', 'S')
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment