summaryrefslogtreecommitdiffstats
path: root/media
diff options
context:
space:
mode:
authorGlenn Kasten <gkasten@google.com>2012-03-21 07:22:40 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2012-03-21 07:22:40 -0700
commit7153494670bdac8b650cb10b8b1838651e0ca418 (patch)
tree94c6c21f7100bdb9aefc82bb0c6d77482742a455 /media
parenta26ff6f22f4e86d09514c2819237bd9748455018 (diff)
parentea7939a079b3600cab955760839b021326f8cfc3 (diff)
downloadframeworks_av-7153494670bdac8b650cb10b8b1838651e0ca418.zip
frameworks_av-7153494670bdac8b650cb10b8b1838651e0ca418.tar.gz
frameworks_av-7153494670bdac8b650cb10b8b1838651e0ca418.tar.bz2
Merge "Whitespace"
Diffstat (limited to 'media')
-rw-r--r--media/libmedia/AudioTrack.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/media/libmedia/AudioTrack.cpp b/media/libmedia/AudioTrack.cpp
index 048be1d..ebb28cd 100644
--- a/media/libmedia/AudioTrack.cpp
+++ b/media/libmedia/AudioTrack.cpp
@@ -194,6 +194,7 @@ status_t AudioTrack::set(
if (AudioSystem::getOutputSamplingRate(&afSampleRate, streamType) != NO_ERROR) {
return NO_INIT;
}
+
uint32_t afLatency;
if (AudioSystem::getOutputLatency(&afLatency, streamType) != NO_ERROR) {
return NO_INIT;
@@ -203,9 +204,11 @@ status_t AudioTrack::set(
if (streamType == AUDIO_STREAM_DEFAULT) {
streamType = AUDIO_STREAM_MUSIC;
}
+
if (sampleRate == 0) {
sampleRate = afSampleRate;
}
+
// these below should probably come from the audioFlinger too...
if (format == AUDIO_FORMAT_DEFAULT) {
format = AUDIO_FORMAT_PCM_16_BIT;