Class BaseAudioDevice.AudioBus

  • Enclosing class:
    BaseAudioDevice

    public static class BaseAudioDevice.AudioBus
    extends java.lang.Object
    The audio bus marshals audio data between the network and the audio device. Call the BaseAudioDevice.getAudioBus() method to get the AudioBus object for the audio device. The audio device pushes captured audio samples to and fetches unrendered audio samples from the audio bus.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int readRenderData​(java.nio.ByteBuffer data, int numberOfSamples)
      Retrieves unrendered audio samples from the session.
      int readRenderData​(java.nio.ShortBuffer data, int numberOfSamples)
      Retrieves unrendered audio samples from the session.
      void writeCaptureData​(java.nio.ByteBuffer data, int numberOfSamples)
      Passes audio data to transmit to a session.
      void writeCaptureData​(java.nio.ShortBuffer data, int numberOfSamples)
      Passes audio data to transmit to a session.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • writeCaptureData

        public void writeCaptureData​(java.nio.ByteBuffer data,
                                     int numberOfSamples)
        Passes audio data to transmit to a session.
        Parameters:
        data - The byte buffer containing audio data.
        numberOfSamples - The number of samples available for copying.
      • writeCaptureData

        public void writeCaptureData​(java.nio.ShortBuffer data,
                                     int numberOfSamples)
        Passes audio data to transmit to a session.
        Parameters:
        data - The byte buffer containing audio data.
        numberOfSamples - The number of samples available for copying.
      • readRenderData

        public int readRenderData​(java.nio.ByteBuffer data,
                                  int numberOfSamples)
        Retrieves unrendered audio samples from the session. This is most commonly used to send audio to the speakers, but is also an entry point for further audio processing.
        Parameters:
        data - The byte buffer containing audio data.
        numberOfSamples - The number of samples requested.
        Returns:
        uint32_t The number of samples copied out of the audio buffer.
      • readRenderData

        public int readRenderData​(java.nio.ShortBuffer data,
                                  int numberOfSamples)
        Retrieves unrendered audio samples from the session. This is most commonly used to send audio to the speakers, but is also an entry point for further audio processing.
        Parameters:
        data - The byte buffer containing audio data.
        numberOfSamples - The number of samples requested.
        Returns:
        uint32_t The number of samples copied out of the audio buffer.