summaryrefslogtreecommitdiffstats
path: root/libaudio
diff options
context:
space:
mode:
authorEric Laurent <elaurent@google.com>2011-11-10 08:30:29 -0800
committerEric Laurent <elaurent@google.com>2011-11-10 08:30:29 -0800
commita1fee1161f403d8fba66a7d76d246a1c785a6d3c (patch)
tree69598ff01e77f0ea5fa913e846156a761cc77125 /libaudio
parente91e13d8b8d0cac4848a06f39575983d0a8762ff (diff)
downloaddevice_samsung_crespo-a1fee1161f403d8fba66a7d76d246a1c785a6d3c.zip
device_samsung_crespo-a1fee1161f403d8fba66a7d76d246a1c785a6d3c.tar.gz
device_samsung_crespo-a1fee1161f403d8fba66a7d76d246a1c785a6d3c.tar.bz2
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
Diffstat (limited to 'libaudio')
-rw-r--r--libaudio/AudioHardware.h4
1 files changed, 2 insertions, 2 deletions
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)