summaryrefslogtreecommitdiffstats
path: root/include/media/AudioSystem.h
diff options
context:
space:
mode:
authorGlenn Kasten <gkasten@google.com>2014-01-08 08:56:06 -0800
committerGlenn Kasten <gkasten@google.com>2014-01-08 11:05:41 -0800
commitf94006ca0f30c27868c284e553f57bf467ae92bc (patch)
tree9e164b25b8db71ce5b970307d05979e8cdf9e2bd /include/media/AudioSystem.h
parent4d973f3894a50413f21e7db284e96afc87f57698 (diff)
downloadframeworks_av-f94006ca0f30c27868c284e553f57bf467ae92bc.zip
frameworks_av-f94006ca0f30c27868c284e553f57bf467ae92bc.tar.gz
frameworks_av-f94006ca0f30c27868c284e553f57bf467ae92bc.tar.bz2
Cleanup error handling in AudioSystem get methods
Don't return zero sample rate or frame count without an error. Change-Id: I052d841080ed33e4f081ae9825a2f33dff444fb9
Diffstat (limited to 'include/media/AudioSystem.h')
-rw-r--r--include/media/AudioSystem.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/media/AudioSystem.h b/include/media/AudioSystem.h
index cd855da..ca9aaf7 100644
--- a/include/media/AudioSystem.h
+++ b/include/media/AudioSystem.h
@@ -94,6 +94,8 @@ public:
static float linearToLog(int volume);
static int logToLinear(float volume);
+ // Returned samplingRate and frameCount output values are guaranteed
+ // to be non-zero if status == NO_ERROR
static status_t getOutputSamplingRate(uint32_t* samplingRate,
audio_stream_type_t stream);
static status_t getOutputFrameCount(size_t* frameCount,