Interface AudioDeviceCapturer

All Known Subinterfaces:
AudioDevice
All Known Implementing Classes:
DefaultAudioDevice

public interface AudioDeviceCapturer
AudioDeviceCapturer interface provides the mechanism to define a custom audio device capturer.
  • Method Details

    • getCapturerFormat

      @Nullable AudioFormat getCapturerFormat()
      Returns the format of the audio that will be captured. Returning `null` indicates capturing is not supported.
      Returns:
      AudioFormat
    • onInitCapturer

      boolean onInitCapturer()
      Raised when the capturer is ready to be initialized. This method is called before onStartCapturing(AudioDeviceContext).
      Returns:
      A boolean value to indicate if initialization was successful.
    • onStartCapturing

      boolean onStartCapturing(@NonNull AudioDeviceContext audioDeviceContext)
      Raised when the capturer is ready to capture. This method is called after onInitCapturer().
      Parameters:
      audioDeviceContext -
      Returns:
      A boolean value that indicates if capturing has started or not.
    • onStopCapturing

      boolean onStopCapturing()
      Raised when the capturer stops capturing. This method is called some time after onStartCapturing(AudioDeviceContext) when audio capturing is no longer needed by the media engine.
      Returns:
      A boolean value that indicates if capturing has stopped or not.