public interface

AudioRecordingController

com.pspdfkit.ui.audio.AudioRecordingController

Class Overview

Controller given when entering audio recording mode.

Summary

Nested Classes
interface AudioRecordingController.AudioRecordingListener Listener for audio recording events. 
Public Methods
abstract void addAudioRecordingListener(AudioRecordingController.AudioRecordingListener listener)
Registers a AudioRecordingController.AudioRecordingListener to get notified when audio recording state changes.
abstract void discardRecording()
Discards recorded audio data.
abstract void exitAudioRecordingMode(boolean enterPlaybackModeAfterSaving)
Leaves recording mode and saves the recorded data.
abstract void exitAudioRecordingMode()
Leaves recording mode and saves the recorded data.
abstract AudioModeManager getAudioModeManager()
Returns the audio mode manager from this controller.
abstract int getCurrentPosition()
Returns current recording position in milliseconds.
abstract int getRecordingTimeLimit()
Returns maximum recording time in milliseconds.
abstract Flowable<ByteBuffer> getVisualizerFlowable()
Returns flowable emitting recorded samples usable for audio visualizer.
abstract boolean isReady()
Checks whether the controller is ready for recording.
abstract boolean isResumed()
Checks whether the audio is currently recording.
abstract void pause()
Pauses recording.
abstract void removeAudioRecordingListener(AudioRecordingController.AudioRecordingListener listener)
Removes a previously registered AudioRecordingController.AudioRecordingListener.
abstract void resume()
Resumes recording.
abstract void toggle()
Toggles recording.

Public Methods

public abstract void addAudioRecordingListener (AudioRecordingController.AudioRecordingListener listener)

Registers a AudioRecordingController.AudioRecordingListener to get notified when audio recording state changes. If the provider has been registered previously, this method will be a no-op.

Parameters
listener Listener to register. Must be non-null.

public abstract void discardRecording ()

Discards recorded audio data.

public abstract void exitAudioRecordingMode (boolean enterPlaybackModeAfterSaving)

Leaves recording mode and saves the recorded data.

Parameters
enterPlaybackModeAfterSaving true to enter playback mode after saving completes

public abstract void exitAudioRecordingMode ()

Leaves recording mode and saves the recorded data.

public abstract AudioModeManager getAudioModeManager ()

Returns the audio mode manager from this controller.

Returns
  • Audio mode manager.

public abstract int getCurrentPosition ()

Returns current recording position in milliseconds.

public abstract int getRecordingTimeLimit ()

Returns maximum recording time in milliseconds.

public abstract Flowable<ByteBuffer> getVisualizerFlowable ()

Returns flowable emitting recorded samples usable for audio visualizer.

Returns
  • Flowable emitting audio recording buffer on each read from the audio recorded.

public abstract boolean isReady ()

Checks whether the controller is ready for recording.

public abstract boolean isResumed ()

Checks whether the audio is currently recording.

public abstract void pause ()

Pauses recording.

public abstract void removeAudioRecordingListener (AudioRecordingController.AudioRecordingListener listener)

Removes a previously registered AudioRecordingController.AudioRecordingListener. If the provider hasn't been registered previously, this method will be a no-op.

Parameters
listener Listener to unregister. Must be non-null.

public abstract void resume ()

Resumes recording.

public abstract void toggle ()

Toggles recording.