diff options
-rw-r--r-- | media/java/android/media/AudioTrack.java | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/media/java/android/media/AudioTrack.java b/media/java/android/media/AudioTrack.java index c0549b8..eff4f16 100644 --- a/media/java/android/media/AudioTrack.java +++ b/media/java/android/media/AudioTrack.java @@ -758,7 +758,7 @@ public class AudioTrack * {@link #ERROR_INVALID_OPERATION} */ public int setStereoVolume(float leftVolume, float rightVolume) { - if (mState != STATE_INITIALIZED) { + if (mState == STATE_UNINITIALIZED) { return ERROR_INVALID_OPERATION; } @@ -803,7 +803,7 @@ public class AudioTrack * {@link #ERROR_INVALID_OPERATION} */ public int setPlaybackRate(int sampleRateInHz) { - if (mState != STATE_INITIALIZED) { + if (mState == STATE_UNINITIALIZED) { return ERROR_INVALID_OPERATION; } if (sampleRateInHz <= 0) { @@ -820,7 +820,7 @@ public class AudioTrack * {@link #ERROR_INVALID_OPERATION} */ public int setNotificationMarkerPosition(int markerInFrames) { - if (mState != STATE_INITIALIZED) { + if (mState == STATE_UNINITIALIZED) { return ERROR_INVALID_OPERATION; } return native_set_marker_pos(markerInFrames); @@ -833,7 +833,7 @@ public class AudioTrack * @return error code or success, see {@link #SUCCESS}, {@link #ERROR_INVALID_OPERATION} */ public int setPositionNotificationPeriod(int periodInFrames) { - if (mState != STATE_INITIALIZED) { + if (mState == STATE_UNINITIALIZED) { return ERROR_INVALID_OPERATION; } return native_set_pos_update_period(periodInFrames); @@ -1069,7 +1069,7 @@ public class AudioTrack * {@link #ERROR_INVALID_OPERATION}, {@link #ERROR_BAD_VALUE} */ public int attachAuxEffect(int effectId) { - if (mState != STATE_INITIALIZED) { + if (mState == STATE_UNINITIALIZED) { return ERROR_INVALID_OPERATION; } return native_attachAuxEffect(effectId); @@ -1091,7 +1091,7 @@ public class AudioTrack * {@link #ERROR_INVALID_OPERATION} */ public int setAuxEffectSendLevel(float level) { - if (mState != STATE_INITIALIZED) { + if (mState == STATE_UNINITIALIZED) { return ERROR_INVALID_OPERATION; } // clamp the level |