summaryrefslogtreecommitdiffstats
path: root/audio
diff options
context:
space:
mode:
authorKyle Repinski <repinski23@gmail.com>2015-03-20 13:54:22 -0500
committerZiyan <jaraidaniel@gmail.com>2016-01-15 12:27:11 +0100
commit0f006c0b2ad1da3ad691246c698ba829cf28bb26 (patch)
tree3d681bdb65b4be1e4f76a512d034f99f40eab50c /audio
parente4c4509c30f9eb14f811438fd080390001aa4318 (diff)
downloaddevice_samsung_tuna-0f006c0b2ad1da3ad691246c698ba829cf28bb26.zip
device_samsung_tuna-0f006c0b2ad1da3ad691246c698ba829cf28bb26.tar.gz
device_samsung_tuna-0f006c0b2ad1da3ad691246c698ba829cf28bb26.tar.bz2
audio: Determine whether or not to use out stream resampler automatically.
Diffstat (limited to 'audio')
-rw-r--r--audio/Android.mk3
-rw-r--r--audio/audio_hw.c1
2 files changed, 1 insertions, 3 deletions
diff --git a/audio/Android.mk b/audio/Android.mk
index 50995a3..bdb47de 100644
--- a/audio/Android.mk
+++ b/audio/Android.mk
@@ -27,8 +27,5 @@ LOCAL_C_INCLUDES += \
LOCAL_SHARED_LIBRARIES := liblog libcutils libtinyalsa libaudioutils libdl libsecril-client
LOCAL_MODULE_TAGS := optional
-# Comment to disable out stream resampler.
-#LOCAL_CFLAGS += -DOUT_RESAMPLER
-
include $(BUILD_SHARED_LIBRARY)
diff --git a/audio/audio_hw.c b/audio/audio_hw.c
index 45f4c44..e865b5c 100644
--- a/audio/audio_hw.c
+++ b/audio/audio_hw.c
@@ -185,6 +185,7 @@
*/
#elif DEFAULT_OUT_SAMPLING_RATE != MM_FULL_POWER_SAMPLING_RATE
#define PLAYBACK_SHORT_PERIOD_COUNT 3
+#define OUT_RESAMPLER
#else
#define PLAYBACK_SHORT_PERIOD_COUNT 2
#endif