本文整理汇总了Python中Red9_CoreUtils.timeIsInRange方法的典型用法代码示例。如果您正苦于以下问题:Python Red9_CoreUtils.timeIsInRange方法的具体用法?Python Red9_CoreUtils.timeIsInRange怎么用?Python Red9_CoreUtils.timeIsInRange使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Red9_CoreUtils
的用法示例。
在下文中一共展示了Red9_CoreUtils.timeIsInRange方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: getAudioInRange
# 需要导入模块: import Red9_CoreUtils [as 别名]
# 或者: from Red9_CoreUtils import timeIsInRange [as 别名]
def getAudioInRange(self, time=(), asNodes=True, start_inRange=True, end_inRange=True):
'''
return any audio in the handler within a given timerange
:param time: tuple, (min,max) timerange within which returned audio has
fall within else it's ignored.
:param asNodes: return the data as r9Audio.AudioNodes
:param start_inRange: check is the testRange[0] value falls fully in the baseRange
:param end_inRange: check is the testRange[1] value falls fully in the baseRange
.. note::
if you pass in time as (None, 100) then we only validate against the end time.
if we pass in time as (10, None) we only validate against the start time
else we validate that testRange is fully within the times
'''
audio_in_range=[]
for a in self.audioNodes:
if r9Core.timeIsInRange(time, (a.startFrame,a.endFrame), start_inRange=start_inRange, end_inRange=end_inRange):
audio_in_range.append(a)
if not asNodes:
return [a.audioNode for a in audio_in_range]
return audio_in_range