Compare to AudioTrack, which already has these checks. Change-Id: I3a239dfb4b918ceabfb723f189cc50ed6662eee6