Skip to content

Commit c949649

Browse files
jmtriviAndroid (Google) Code Review
authored andcommitted
Merge "Unhide Visualizer scaling mode definitions and methods"
2 parents f40a02f + 9517946 commit c949649

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

api/current.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11767,18 +11767,22 @@ package android.media.audiofx {
1176711767
method public int getFft(byte[]) throws java.lang.IllegalStateException;
1176811768
method public static int getMaxCaptureRate();
1176911769
method public int getSamplingRate() throws java.lang.IllegalStateException;
11770+
method public int getScalingMode() throws java.lang.IllegalStateException;
1177011771
method public int getWaveForm(byte[]) throws java.lang.IllegalStateException;
1177111772
method public void release();
1177211773
method public int setCaptureSize(int) throws java.lang.IllegalStateException;
1177311774
method public int setDataCaptureListener(android.media.audiofx.Visualizer.OnDataCaptureListener, int, boolean, boolean);
1177411775
method public int setEnabled(boolean) throws java.lang.IllegalStateException;
11776+
method public int setScalingMode(int) throws java.lang.IllegalStateException;
1177511777
field public static final int ALREADY_EXISTS = -2; // 0xfffffffe
1177611778
field public static final int ERROR = -1; // 0xffffffff
1177711779
field public static final int ERROR_BAD_VALUE = -4; // 0xfffffffc
1177811780
field public static final int ERROR_DEAD_OBJECT = -7; // 0xfffffff9
1177911781
field public static final int ERROR_INVALID_OPERATION = -5; // 0xfffffffb
1178011782
field public static final int ERROR_NO_INIT = -3; // 0xfffffffd
1178111783
field public static final int ERROR_NO_MEMORY = -6; // 0xfffffffa
11784+
field public static final int SCALING_MODE_AS_PLAYED = 1; // 0x1
11785+
field public static final int SCALING_MODE_NORMALIZED = 0; // 0x0
1178211786
field public static final int STATE_ENABLED = 2; // 0x2
1178311787
field public static final int STATE_INITIALIZED = 1; // 0x1
1178411788
field public static final int STATE_UNINITIALIZED = 0; // 0x0

media/java/android/media/audiofx/Visualizer.java

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -83,13 +83,11 @@ public class Visualizer {
8383

8484
// to keep in sync with system/media/audio_effects/include/audio_effects/effect_visualizer.h
8585
/**
86-
* @hide
8786
* Defines a capture mode where amplification is applied based on the content of the captured
8887
* data. This is the default Visualizer mode, and is suitable for music visualization.
8988
*/
9089
public static final int SCALING_MODE_NORMALIZED = 0;
9190
/**
92-
* @hide
9391
* Defines a capture mode where the playback volume will affect (scale) the range of the
9492
* captured data. A low playback volume will lead to low sample and fft values, and vice-versa.
9593
*/
@@ -316,7 +314,6 @@ public int getCaptureSize()
316314
}
317315

318316
/**
319-
* @hide
320317
* Set the type of scaling applied on the captured visualization data.
321318
* @param mode see {@link #SCALING_MODE_NORMALIZED}
322319
* and {@link #SCALING_MODE_AS_PLAYED}
@@ -336,7 +333,6 @@ public int setScalingMode(int mode)
336333
}
337334

338335
/**
339-
* @hide
340336
* Returns the current scaling mode on the captured visualization data.
341337
* @return the scaling mode, see {@link #SCALING_MODE_NORMALIZED}
342338
* and {@link #SCALING_MODE_AS_PLAYED}.

0 commit comments

Comments
 (0)