From a1fee1161f403d8fba66a7d76d246a1c785a6d3c Mon Sep 17 00:00:00 2001 From: Eric Laurent Date: Thu, 10 Nov 2011 08:30:29 -0800 Subject: libaudio: increase audio buffer size Bring playback and capture buffer size back to their initial size. Current size was dictated by constraints in early voice processing implementation but is not necessary anymore. Increasing buffer size will help in power consumption and limit possible occurence of audio skipping during playback and capture. Change-Id: I7837c62e11700ed5c9a26f52fb27170add09721d --- libaudio/AudioHardware.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'libaudio') diff --git a/libaudio/AudioHardware.h b/libaudio/AudioHardware.h index 1148478..a183a98 100644 --- a/libaudio/AudioHardware.h +++ b/libaudio/AudioHardware.h @@ -57,7 +57,7 @@ namespace android_audio_legacy { // Default audio output sample format #define AUDIO_HW_OUT_FORMAT (AudioSystem::PCM_16_BIT) // Kernel pcm out buffer size in frames at 44.1kHz -#define AUDIO_HW_OUT_PERIOD_SZ 448 +#define AUDIO_HW_OUT_PERIOD_SZ 1024 #define AUDIO_HW_OUT_PERIOD_CNT 4 // Default audio output buffer size in bytes #define AUDIO_HW_OUT_PERIOD_BYTES (AUDIO_HW_OUT_PERIOD_SZ * 2 * sizeof(int16_t)) @@ -69,7 +69,7 @@ namespace android_audio_legacy { // Default audio input sample format #define AUDIO_HW_IN_FORMAT (AudioSystem::PCM_16_BIT) // Kernel pcm in buffer size in frames at 44.1kHz (before resampling) -#define AUDIO_HW_IN_PERIOD_SZ 448 +#define AUDIO_HW_IN_PERIOD_SZ 1024 #define AUDIO_HW_IN_PERIOD_CNT 4 // Default audio input buffer size in bytes (8kHz mono) #define AUDIO_HW_IN_PERIOD_BYTES ((AUDIO_HW_IN_PERIOD_SZ*sizeof(int16_t))/8) -- cgit v1.1