Class ShadowAudioEffect

    • Constructor Detail

      • ShadowAudioEffect

        public ShadowAudioEffect()
    • Method Detail

      • native_setEnabled

        @Implementation
        protected int native_setEnabled​(boolean enabled)
        Marks the AudioEffect as enabled, and always returns SUCCESS.
      • native_setParameter

        @Implementation
        protected int native_setParameter​(int psize,
                                          byte[] param,
                                          int vsize,
                                          byte[] value)
        Sets the parameter with the given key param to the given value value.
        Returns:
        always SUCCESS
      • native_getParameter

        @Implementation
        protected int native_getParameter​(int psize,
                                          byte[] param,
                                          int vsize,
                                          byte[] value)
        Gets the value of the parameter with key param, by putting its value in value.

        Note: Sub-classes of ShadowAudioEffect can declare default values for any parameters. Note: If the given parameter has not been set, and there is no default value for that parameter, then we "return" (set value to) a single integer 0.

        Returns:
        the size of the returned value, in bytes, or an error code in case of failure.
      • getDefaultParameter

        protected Optional<ByteBuffer> getDefaultParameter​(ByteBuffer parameter)
        Allows sub-classes to provide default parameters.

        Override this method to provide default parameters.

      • getPriority

        public int getPriority()
        Returns the priority set in the AudioEffect ctor.
      • getAudioSession

        public int getAudioSession()
        Returns the audio session set in the AudioEffect ctor.
      • setInitialized

        public void setInitialized​(boolean initialized)
        Updates the state of the AudioEffect itself.

        This can be used e.g. to put the AudioEffect in an unexpected state and cause an exception the next time the Visualizer is used.

      • setErrorCode

        public void setErrorCode​(int errorCode)
        Sets the error code to override setter methods in this class.

        When the error code is set to anything other than SUCCESS setters in the AudioEffect will early-out and return that error code.

      • getAudioEffects

        public static com.google.common.collect.ImmutableList<AudioEffect> getAudioEffects()
        Returns all effects created with an AudioEffect constructor.
      • native_release

        @Implementation
        protected void native_release()
        Removes this audio effect from the set of active audio effects.
      • reset

        @Resetter
        public static void reset()