Cleanup AudioTrack::getMinFrameCount error handling
Guarantee to return a non-zero frameCount for return status NO_ERROR;
Return the correct specific status_t if any of the AudioSystem APIs fail,
instead of the generic NO_INIT.
API change: getMinFramCount no longer defaults to zero on error, so
callers _must_ check the return status. This change makes
getMinFrameCount more like other APIs. All known callers were reviewed,
and they do check the return status.
Change-Id: I4a8342a75ee89a068c23c84b8380ed9d1b968507
diff --git a/include/media/AudioTrack.h b/include/media/AudioTrack.h
index 9f631cf..8afcc5d 100644
--- a/include/media/AudioTrack.h
+++ b/include/media/AudioTrack.h
@@ -123,6 +123,8 @@
* - NO_ERROR: successful operation
* - NO_INIT: audio server or audio hardware not initialized
* - BAD_VALUE: unsupported configuration
+ * frameCount is guaranteed to be non-zero if status is NO_ERROR,
+ * and is undefined otherwise.
*/
static status_t getMinFrameCount(size_t* frameCount,