Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c9496495 authored by Jean-Michel Trivi's avatar Jean-Michel Trivi Committed by Android (Google) Code Review
Browse files

Merge "Unhide Visualizer scaling mode definitions and methods"

parents f40a02f8 95179461
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -11767,11 +11767,13 @@ package android.media.audiofx {
    method public int getFft(byte[]) throws java.lang.IllegalStateException;
    method public static int getMaxCaptureRate();
    method public int getSamplingRate() throws java.lang.IllegalStateException;
    method public int getScalingMode() throws java.lang.IllegalStateException;
    method public int getWaveForm(byte[]) throws java.lang.IllegalStateException;
    method public void release();
    method public int setCaptureSize(int) throws java.lang.IllegalStateException;
    method public int setDataCaptureListener(android.media.audiofx.Visualizer.OnDataCaptureListener, int, boolean, boolean);
    method public int setEnabled(boolean) throws java.lang.IllegalStateException;
    method public int setScalingMode(int) throws java.lang.IllegalStateException;
    field public static final int ALREADY_EXISTS = -2; // 0xfffffffe
    field public static final int ERROR = -1; // 0xffffffff
    field public static final int ERROR_BAD_VALUE = -4; // 0xfffffffc
@@ -11779,6 +11781,8 @@ package android.media.audiofx {
    field public static final int ERROR_INVALID_OPERATION = -5; // 0xfffffffb
    field public static final int ERROR_NO_INIT = -3; // 0xfffffffd
    field public static final int ERROR_NO_MEMORY = -6; // 0xfffffffa
    field public static final int SCALING_MODE_AS_PLAYED = 1; // 0x1
    field public static final int SCALING_MODE_NORMALIZED = 0; // 0x0
    field public static final int STATE_ENABLED = 2; // 0x2
    field public static final int STATE_INITIALIZED = 1; // 0x1
    field public static final int STATE_UNINITIALIZED = 0; // 0x0
+0 −4
Original line number Diff line number Diff line
@@ -83,13 +83,11 @@ public class Visualizer {

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

    /**
     * @hide
     * Set the type of scaling applied on the captured visualization data.
     * @param mode see {@link #SCALING_MODE_NORMALIZED}
     *     and {@link #SCALING_MODE_AS_PLAYED}
@@ -336,7 +333,6 @@ public class Visualizer {
    }

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