Class ShadowVisualizer

    • Constructor Detail

      • ShadowVisualizer

        public ShadowVisualizer()
    • Method Detail

      • setDataCaptureListener

        @Implementation(minSdk=9)
        protected int setDataCaptureListener​(Visualizer.OnDataCaptureListener listener,
                                             int rate,
                                             boolean waveform,
                                             boolean fft)
      • native_getSamplingRate

        @Implementation(minSdk=9)
        protected int native_getSamplingRate()
      • native_getWaveForm

        @Implementation(minSdk=9)
        protected int native_getWaveForm​(byte[] waveform)
      • native_getFft

        @Implementation(minSdk=9)
        protected int native_getFft​(byte[] fft)
      • native_getEnabled

        @Implementation(minSdk=9)
        protected boolean native_getEnabled()
      • native_setCaptureSize

        @Implementation(minSdk=9)
        protected int native_setCaptureSize​(int size)
      • native_getCaptureSize

        @Implementation(minSdk=9)
        protected int native_getCaptureSize()
      • native_setEnabled

        @Implementation(minSdk=9)
        protected int native_setEnabled​(boolean enabled)
      • native_release

        @Implementation(minSdk=9)
        protected void native_release()
      • triggerDataCapture

        public void triggerDataCapture()
        Trigger calls to the existing Visualizer.OnDataCaptureListener.

        This is a no-op if the listener has not been set.

      • setState

        public void setState​(int newState)
        Updates the state of the Visualizer itself.

        This can be used e.g. to put the Visualizer 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 Visualizer.SUCCESS setters in the Visualizer will early-out and return that error code.