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
Modifier and TypeMethodDescriptionReturns the format of the audio that will be captured.booleanRaised when the capturer is ready to be initialized.booleanonStartCapturing(AudioDeviceContext audioDeviceContext) Raised when the capturer is ready to capture.booleanRaised when the capturer stops capturing.
-
Method Details
-
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
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.
-