예제 #1
0
 def test_audioNode_given(self):
     # test from a given Maya sound node
     cmds.file(self.path, i=True, type='audio', options='o=0')
     node = cmds.ls(type='audio')[0]
     audio = r9Audio.AudioNode(node)
     assert audio.audioNode == node
     assert audio.isLoaded
예제 #2
0
 def test_path_but_Loaded(self):
     cmds.file(self.path, i=True, type='audio', options='o=0')
     node = cmds.ls(type='audio')[0]
     assert node
     audio = r9Audio.AudioNode(filepath=self.path)
     assert audio.path == self.path
     assert audio.isLoaded
     assert audio.audioNode == node
예제 #3
0
 def test_path_but_Loaded(self):
     # from Path but that path is a loaded Maya sound node
     cmds.file(self.path, i=True, type='audio', options='o=0')
     node = cmds.ls(type='audio')[0]
     assert node
     audio = r9Audio.AudioNode(filepath=self.path)
     assert audio.path == self.path
     assert audio.isLoaded
     assert audio.audioNode == node
예제 #4
0
 def test_pyDub_base(self):
     # pyDub calls internal
     self.audioNode = r9Audio.AudioNode(filepath=self.path)
     assert self.audioNode.sample_width == 2
     assert self.audioNode.sampleRate == 44100
     assert self.audioNode.sample_bits == 16
     assert self.audioNode.channels == 1
     print self.audioNode.dBFS
     print self.audioNode.max_dBFS
     assert True  # self.audioNode.dBFS
예제 #5
0
 def test_path_given(self):
     pathNode = r9Audio.AudioNode(filepath=self.path)
     assert not pathNode.isLoaded
     assert pathNode.path == self.path
     assert not pathNode.audioNode
     assert int(pathNode.endFrame) == 199
     assert int(pathNode.endTime) == 8294
     assert pathNode.startTime == 0
     assert pathNode.startFrame == 0
     pathNode.importAndActivate()
     assert pathNode.isLoaded
     assert pathNode.audioNode
     assert pathNode.isValid()
예제 #6
0
 def test_path_given(self):
     # build the AudioNode directly from the path not through Maya
     pathNode = r9Audio.AudioNode(filepath=self.path)
     assert not pathNode.isLoaded
     assert pathNode.path == self.path
     assert not pathNode.audioNode
     assert int(pathNode.endFrame) == 199
     assert int(pathNode.endTime) == 8294
     assert pathNode.startTime == 0
     assert pathNode.startFrame == 0
     pathNode.importAndActivate()
     assert pathNode.isLoaded
     assert pathNode.audioNode
     assert pathNode.isValid()
예제 #7
0
 def setup(self):
     cmds.file(new=True, f=True)
     self.bwavpath = os.path.join(r9Setup.red9ModulePath(), 'tests',
                                  'testFiles', 'bwav_test.wav')
     self.audioNode = r9Audio.AudioNode(filepath=self.bwavpath)
     self.audioNode.importAndActivate()