Difference between revisions of "IC Python API:RLPy RAudioRecorderCallback"
From Reallusion Wiki!
Chuck (RL) (Talk | contribs) (Created page with "{{TOC}} {{Parent|IC_Python_API:RL_Python_Modules|Modules}} ==Detailed Description== Callback class of the Tcp network. ----- ===OnTimeLimitReached=== <syntaxhighlight lang="Py...") |
Chuck (RL) (Talk | contribs) m |
||
Line 1: | Line 1: | ||
{{TOC}} | {{TOC}} | ||
{{Parent|IC_Python_API:RL_Python_Modules|Modules}} | {{Parent|IC_Python_API:RL_Python_Modules|Modules}} | ||
− | == | + | {{last_modified}} |
− | Callback class of the | + | |
− | + | == Description == | |
− | === | + | |
− | <syntaxhighlight lang=" | + | Callback class of the RAudioRecorder. |
− | RLPy.RAudioRecorderCallback.OnTimeLimitReached ( self ) | + | |
+ | == Member Functions == | ||
+ | |||
+ | === OnTimeLimitReached == | ||
+ | |||
+ | Callback event when audio recorder time limit has been reached. | ||
+ | |||
+ | <syntaxhighlight lang="python" line='line'> | ||
+ | class RLAudioRecorderCallback(RLPy.RAudioRecorderCallback): | ||
+ | def __init__(self): | ||
+ | RLPy.RAudioRecorderCallback.__init__(self) | ||
+ | self.time_reached = None | ||
+ | |||
+ | def OnTimeLimitReached(self): | ||
+ | if self.time_reached != None: | ||
+ | self.time_reached() | ||
+ | audio_callback = RLAudioRecorderCallback() | ||
+ | audio_recorder = RLPy.RAudioRecorder() | ||
+ | audio_recorder.RegisterCallback(audio_callback) | ||
</syntaxhighlight> | </syntaxhighlight> | ||
− |
Revision as of 00:26, 23 April 2020
- 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)