OSDN Git Service

Cleanup AudioSystem::getInputBufferSize error handling and caching
authorGlenn Kasten <gkasten@google.com>
Wed, 8 Jan 2014 16:58:53 +0000 (08:58 -0800)
committerGlenn Kasten <gkasten@google.com>
Wed, 8 Jan 2014 18:05:05 +0000 (10:05 -0800)
commit5446e541367061b53f45f3fd4600f9060680bca3
treeaab5a964fa730bc79bad87c2904177019e856827
parent4d973f3894a50413f21e7db284e96afc87f57698
Cleanup AudioSystem::getInputBufferSize error handling and caching

Previously, if the IAudioFlinger::getInputBufferSize failed,
it would return NO_ERROR but a zero buffer size value, which could
confuse the caller.  Now it returns BAD_VALUE in this case.

Also it would still cache the zero buffer size.  Now it does
not cache on failure.

Removed over-initialization of the cache globals.

Change-Id: I6835fcb56fe52535e018fc8c0c242115221b5d85
media/libmedia/AudioSystem.cpp