IC Python API:RLPy RAudioRecorderCallback

From Reallusion Wiki!
Jump to: navigation, search

Main article: Modules. Last modified: 04/23/2020

Description

Callback class of the RAudioRecorder.

Member Functions

OnTimeLimitReached

Callback event when audio recorder time limit has been reached.

 1 class RLAudioRecorderCallback(RLPy.RAudioRecorderCallback):
 2     def __init__(self):
 3         RLPy.RAudioRecorderCallback.__init__(self)
 4         self.time_reached = None
 5         
 6     def OnTimeLimitReached(self):
 7         if self.time_reached != None:
 8             self.time_reached()
 9 audio_callback = RLAudioRecorderCallback()
10 audio_recorder = RLPy.RAudioRecorder()
11 audio_recorder.RegisterCallback(audio_callback)