Package com.twilio.voice
Interface AudioDeviceRenderer
-
- All Known Subinterfaces:
AudioDevice
- All Known Implementing Classes:
DefaultAudioDevice
public interface AudioDeviceRenderer
AudioDeviceRenderer interface provides the mechanism to define a custom audio device renderer.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description AudioFormat
getRendererFormat()
Returns the format of the audio that will be rendered.boolean
onInitRenderer()
Raised when the Renderer is ready to be initialized.boolean
onStartRendering(AudioDeviceContext audioDeviceContext)
Raised when the renderer is ready to render.boolean
onStopRendering()
Raised when the capturer stops rendering.
-
-
-
Method Detail
-
getRendererFormat
@Nullable AudioFormat getRendererFormat()
Returns the format of the audio that will be rendered. Returning `null` indicates rendering is not supported.- Returns:
AudioFormat
-
onInitRenderer
boolean onInitRenderer()
Raised when the Renderer is ready to be initialized. This method is called beforeonStartRendering(AudioDeviceContext)
.- Returns:
- A boolean value to indicate if initialization was successful.
-
onStartRendering
boolean onStartRendering(@NonNull AudioDeviceContext audioDeviceContext)
Raised when the renderer is ready to render.- Parameters:
audioDeviceContext
-- Returns:
- A boolean value that indicates if rendering has started or not.
-
onStopRendering
boolean onStopRendering()
Raised when the capturer stops rendering.- Returns:
- A boolean value that indicates if rendering has stopped or not.
-
-