Package com.twilio.voice
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 Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description AudioFormat
getCapturerFormat()
Returns the format of the audio that will be captured.boolean
onInitCapturer()
Raised when the capturer is ready to be initialized.boolean
onStartCapturing(AudioDeviceContext audioDeviceContext)
Raised when the capturer is ready to capture.boolean
onStopCapturing()
Raised when the capturer stops capturing.
-
-
-
Method Detail
-
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 beforeonStartCapturing(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 afteronInitCapturer()
.- 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 afteronStartCapturing(AudioDeviceContext)
when audio capturing is no longer needed by the media engine.- Returns:
- A boolean value that indicates if capturing has stopped or not.
-
-