summaryrefslogtreecommitdiffstats
path: root/media
diff options
context:
space:
mode:
authorGlenn Kasten <gkasten@google.com>2014-01-14 17:33:33 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2014-01-14 17:33:33 +0000
commit7e47f25f9031e231f5fdbbb789435485d1af45af (patch)
tree89986e4eb1e02714758e391b5cc0ce8223cb1b29 /media
parent18a3609d6611714059ef8a75a0106c6be6341748 (diff)
parentb1bef51fec06e8bceec914d1b48b411d3ff2adff (diff)
downloadframeworks_av-7e47f25f9031e231f5fdbbb789435485d1af45af.zip
frameworks_av-7e47f25f9031e231f5fdbbb789435485d1af45af.tar.gz
frameworks_av-7e47f25f9031e231f5fdbbb789435485d1af45af.tar.bz2
Merge "Improve error logging for getOutputSamplingRate"
Diffstat (limited to 'media')
-rw-r--r--media/libmedia/AudioTrack.cpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/media/libmedia/AudioTrack.cpp b/media/libmedia/AudioTrack.cpp
index a6ffc62..f9d335f 100644
--- a/media/libmedia/AudioTrack.cpp
+++ b/media/libmedia/AudioTrack.cpp
@@ -245,12 +245,14 @@ status_t AudioTrack::set(
streamType = AUDIO_STREAM_MUSIC;
}
+ status_t status;
if (sampleRate == 0) {
- uint32_t afSampleRate;
- if (AudioSystem::getOutputSamplingRate(&afSampleRate, streamType) != NO_ERROR) {
- return NO_INIT;
+ status = AudioSystem::getOutputSamplingRate(&sampleRate, streamType);
+ if (status != NO_ERROR) {
+ ALOGE("Could not get output sample rate for stream type %d; status %d",
+ streamType, status);
+ return status;
}
- sampleRate = afSampleRate;
}
mSampleRate = sampleRate;
@@ -338,7 +340,7 @@ status_t AudioTrack::set(
}
// create the IAudioTrack
- status_t status = createTrack_l(streamType,
+ status = createTrack_l(streamType,
sampleRate,
format,
frameCount,