AudioTrack::setVolume check range

Change-Id: Ie182bf0f741f1f49f68c02a1e7437a2a34d34fc5
This commit is contained in:
Glenn Kasten
2011-11-30 09:46:04 -08:00
parent e61fd281a8
commit 1c50a789ca

View File

@@ -477,7 +477,7 @@ bool AudioTrack::muted() const
status_t AudioTrack::setVolume(float left, float right)
{
if (left > 1.0f || right > 1.0f) {
if (left < 0.0f || left > 1.0f || right < 0.0f || right > 1.0f) {
return BAD_VALUE;
}