Package com.google.android.exoplayer2.ext.gvr

## Class GvrAudioProcessor

- java.lang.Object
- - com.google.android.exoplayer2.ext.gvr.GvrAudioProcessor

- All Implemented Interfaces:
    `AudioProcessor`

      @Deprecated
      public class GvrAudioProcessor
      extends Object
      implements AudioProcessor

  Deprecated.
  If you still need this component, please contact us by filing an issue on our issue tracker.
  An `AudioProcessor` that uses `GvrAudioSurround` to provide binaural rendering of surround sound and ambisonic soundfields.

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from interface com.google.android.exoplayer2.audio.AudioProcessor

      `AudioProcessor.AudioFormat, AudioProcessor.UnhandledAudioFormatException`

  - ### Field Summary

    - ### Fields inherited from interface com.google.android.exoplayer2.audio.AudioProcessor

      `EMPTY_BUFFER`

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `GvrAudioProcessor()` | Deprecated. Creates a new GVR audio processor.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods Deprecated Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `AudioProcessor.AudioFormat` | `configure​(AudioProcessor.AudioFormat inputAudioFormat)` | Deprecated. Configures the processor to process input audio with the specified format.
    `void` | `flush()` | Deprecated. Clears any buffered data and pending output.
    `ByteBuffer` | `getOutput()` | Deprecated. Returns a buffer containing processed output data between its position and limit.
    `boolean` | `isActive()` | Deprecated. Returns whether the processor is configured and will process input buffers.
    `boolean` | `isEnded()` | Deprecated. Returns whether this processor will return no more output from `AudioProcessor.getOutput()` until it has been `AudioProcessor.flush()`ed and more input has been queued.
    `void` | `queueEndOfStream()` | Deprecated. Queues an end of stream signal.
    `void` | `queueInput​(ByteBuffer inputBuffer)` | Deprecated. Queues audio data between the position and limit of the input `buffer` for processing.
    `void` | `reset()` | Deprecated. Resets the processor to its unconfigured state, releasing any resources.
    `void` | `updateOrientation​(float w, float x, float y, float z)` | Deprecated. Updates the listener head orientation.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### GvrAudioProcessor

          public GvrAudioProcessor()

      Deprecated.
      Creates a new GVR audio processor.

  - ### Method Detail

    - #### updateOrientation

          public void updateOrientation​(float w,
                                        float x,
                                        float y,
                                        float z)

      Deprecated.
      Updates the listener head orientation. May be called on any thread. See `GvrAudioSurround.updateNativeOrientation`.
      Parameters:
        `w` - The w component of the quaternion.
        `x` - The x component of the quaternion.
        `y` - The y component of the quaternion.
        `z` - The z component of the quaternion.

    - #### configure

          public AudioProcessor.AudioFormat configure​(AudioProcessor.AudioFormat inputAudioFormat)
                                               throws AudioProcessor.UnhandledAudioFormatException

      Deprecated.
      Description copied from interface: `AudioProcessor`
      Configures the processor to process input audio with the specified format. After calling this method, call `AudioProcessor.isActive()` to determine whether the audio processor is active. Returns the configured output audio format if this instance is active.

      After calling this method, it is necessary to `AudioProcessor.flush()` the processor to apply the new configuration. Before applying the new configuration, it is safe to queue input and get output in the old input/output formats. Call `AudioProcessor.queueEndOfStream()` when no more input will be supplied in the old input format.

      Specified by:
        `configure` in interface `AudioProcessor`
      Parameters:
        `inputAudioFormat` - The format of audio that will be queued after the next call to `AudioProcessor.flush()`.
      Returns:
        The configured output audio format if this instance is `active`.
      Throws:
        `AudioProcessor.UnhandledAudioFormatException` - Thrown if the specified format can't be handled as input.

    - #### isActive

          public boolean isActive()

      Deprecated.
      Description copied from interface: `AudioProcessor`
      Returns whether the processor is configured and will process input buffers.
      Specified by:
        `isActive` in interface `AudioProcessor`

    - #### queueInput

          public void queueInput​(ByteBuffer inputBuffer)

      Deprecated.
      Description copied from interface: `AudioProcessor`
      Queues audio data between the position and limit of the input `buffer` for processing. `buffer` must be a direct byte buffer with native byte order. Its contents are treated as read-only. Its position will be advanced by the number of bytes consumed (which may be zero). The caller retains ownership of the provided buffer. Calling this method invalidates any previous buffer returned by `AudioProcessor.getOutput()`.
      Specified by:
        `queueInput` in interface `AudioProcessor`
      Parameters:
        `inputBuffer` - The input buffer to process.

    - #### queueEndOfStream

          public void queueEndOfStream()

      Deprecated.
      Description copied from interface: `AudioProcessor`
      Queues an end of stream signal. After this method has been called, `AudioProcessor.queueInput(ByteBuffer)` may not be called until after the next call to `AudioProcessor.flush()`. Calling `AudioProcessor.getOutput()` will return any remaining output data. Multiple calls may be required to read all of the remaining output data. `AudioProcessor.isEnded()` will return `true` once all remaining output data has been read.
      Specified by:
        `queueEndOfStream` in interface `AudioProcessor`

    - #### getOutput

          public ByteBuffer getOutput()

      Deprecated.
      Description copied from interface: `AudioProcessor`
      Returns a buffer containing processed output data between its position and limit. The buffer will always be a direct byte buffer with native byte order. Calling this method invalidates any previously returned buffer. The buffer will be empty if no output is available.
      Specified by:
        `getOutput` in interface `AudioProcessor`
      Returns:
        A buffer containing processed output data between its position and limit.

    - #### isEnded

          public boolean isEnded()

      Deprecated.
      Description copied from interface: `AudioProcessor`
      Returns whether this processor will return no more output from `AudioProcessor.getOutput()` until it has been `AudioProcessor.flush()`ed and more input has been queued.
      Specified by:
        `isEnded` in interface `AudioProcessor`

    - #### flush

          public void flush()

      Deprecated.
      Description copied from interface: `AudioProcessor`
      Clears any buffered data and pending output. If the audio processor is active, also prepares the audio processor to receive a new stream of input in the last configured (pending) format.
      Specified by:
        `flush` in interface `AudioProcessor`

    - #### reset

          public void reset()

      Deprecated.
      Description copied from interface: `AudioProcessor`
      Resets the processor to its unconfigured state, releasing any resources.
      Specified by:
        `reset` in interface `AudioProcessor`