diff options
author | Andy Hung <hunga@google.com> | 2015-04-24 17:32:57 -0700 |
---|---|---|
committer | Andy Hung <hunga@google.com> | 2015-04-24 17:32:57 -0700 |
commit | 18cb3b5a27148c7d4556db4a55e8c2bafafef32c (patch) | |
tree | bb87b145d11cb96e6ddf3608cfcb7528bc0d321c /media | |
parent | 30d794360f35592554403922bcc07835fea4737b (diff) | |
download | frameworks_base-18cb3b5a27148c7d4556db4a55e8c2bafafef32c.zip frameworks_base-18cb3b5a27148c7d4556db4a55e8c2bafafef32c.tar.gz frameworks_base-18cb3b5a27148c7d4556db4a55e8c2bafafef32c.tar.bz2 |
Hide stretch mode from PlaybackSettings
Different timestretch modes won't be ready for M.
Change-Id: I4fe5ceee5bdf90cb735eb415185812603b5c68a8
Diffstat (limited to 'media')
-rw-r--r-- | media/java/android/media/AudioTrack.java | 5 | ||||
-rw-r--r-- | media/java/android/media/PlaybackSettings.java | 12 |
2 files changed, 6 insertions, 11 deletions
diff --git a/media/java/android/media/AudioTrack.java b/media/java/android/media/AudioTrack.java index 147d7fc..ac02bf3 100644 --- a/media/java/android/media/AudioTrack.java +++ b/media/java/android/media/AudioTrack.java @@ -926,8 +926,7 @@ public class AudioTrack return new PlaybackSettings() .setSpeed(floatArray[0]) .setPitch(floatArray[1]) - .setAudioFallbackMode(intArray[0]) - .setAudioStretchMode(intArray[1]); + .setAudioFallbackMode(intArray[0]); } /** @@ -1350,7 +1349,7 @@ public class AudioTrack }; intArray = new int[] { settings.getAudioFallbackMode(), - settings.getAudioStretchMode(), + PlaybackSettings.AUDIO_STRETCH_MODE_DEFAULT, }; } catch (IllegalStateException e) { throw new IllegalArgumentException(e); diff --git a/media/java/android/media/PlaybackSettings.java b/media/java/android/media/PlaybackSettings.java index ceb6bb1..b2e1033 100644 --- a/media/java/android/media/PlaybackSettings.java +++ b/media/java/android/media/PlaybackSettings.java @@ -38,14 +38,6 @@ import android.annotation.IntDef; * Return {@link java.lang.IllegalArgumentException} from * <code>AudioTrack.setPlaybackSettings(PlaybackSettings)</code>.</li> * </ul> - * <p> <strong>audio stretch mode:</strong> select - * timestretch handling. - * <ul> - * <li> {@link PlaybackSettings#AUDIO_STRETCH_MODE_DEFAULT}: - * System will determine best selection. </li> - * <li> {@link PlaybackSettings#AUDIO_STRETCH_MODE_VOICE}: - * Content is primarily voice.</li> - * </ul> * <p> <strong>pitch:</strong> increases or decreases the tonal frequency of the audio content. * It is expressed as a multiplicative factor, where normal pitch is 1.0f. * <p> <strong>speed:</strong> increases or decreases the time to @@ -84,7 +76,9 @@ public final class PlaybackSettings { ) @Retention(RetentionPolicy.SOURCE) public @interface AudioStretchMode {} + /** @hide */ public static final int AUDIO_STRETCH_MODE_DEFAULT = 0; + /** @hide */ public static final int AUDIO_STRETCH_MODE_VOICE = 1; // flags to indicate which settings are actually set @@ -136,6 +130,7 @@ public final class PlaybackSettings { } /** + * @hide * Sets the audio stretch mode. * @param audioStretchMode * @return this <code>PlaybackSettings</code> instance. @@ -147,6 +142,7 @@ public final class PlaybackSettings { } /** + * @hide * Retrieves the audio stretch mode. * @return audio stretch mode * @throws IllegalStateException if the audio stretch mode is not set. |