diff options
author | Glenn Kasten <gkasten@google.com> | 2012-12-06 13:48:03 -0800 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2012-12-06 13:48:34 -0800 |
commit | 91c7bc2a8db473eb6188ae9fb16760c66782f025 (patch) | |
tree | 58d625dbc27e9cc8870287ddc9c55422bab82323 /media | |
parent | 42b1b564b63fa9c93df894ac8eca8db68fd5c435 (diff) | |
parent | 3b4df62704a6184878afd9272830cf3db7bd2d66 (diff) | |
download | frameworks_base-91c7bc2a8db473eb6188ae9fb16760c66782f025.zip frameworks_base-91c7bc2a8db473eb6188ae9fb16760c66782f025.tar.gz frameworks_base-91c7bc2a8db473eb6188ae9fb16760c66782f025.tar.bz2 |
Merge "Allow more APIs before write in static buffer mode"
Diffstat (limited to 'media')
-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 |