Exemplo n.º 1
0
 def testAudioFileReaderConfig(self):
     reader = clam.MonoAudioFileReader()
     config = clam.MonoAudioFileReaderConfig()
     self.assertEqual(False,
                      reader.Configure(clam.toProcessingConfig(config)))
     config.SetSourceFile("trumpet.mp3")
     self.assertEqual(True,
                      reader.Configure(clam.toProcessingConfig(config)))
Exemplo n.º 2
0
 def testConfigureProcessingFromTheNetwork(self):
     reader = self.network.AddProcessing("MonoAudioFileReader")
     config = clam.MonoAudioFileReaderConfig()
     self.assertEqual(
         False,
         self.network.ConfigureProcessing(reader,
                                          clam.toProcessingConfig(config)))
     config.SetSourceFile("trumpet.mp3")
     self.assertEqual(
         True,
         self.network.ConfigureProcessing(reader,
                                          clam.toProcessingConfig(config)))
Exemplo n.º 3
0
    def testAudioFileReaderLength(self):
        network = clam.Network()
        reader = network.AddProcessing("MonoAudioFileReader")
        config = clam.MonoAudioFileReaderConfig()
        config.SetSourceFile("trumpet.mp3")
        network.ConfigureProcessing(reader, clam.toProcessingConfig(config))
        self.assertEqual(2, int(network.GetProcessing(reader).GetHeader().GetLength() / 1000))

        reader = clam.MonoAudioFileReader()
        config = clam.MonoAudioFileReaderConfig()
        config.SetSourceFile("trumpet.mp3")
        reader.Configure(clam.toProcessingConfig(config))
        self.assertEqual(2, int(reader.GetHeader().GetLength() / 1000))
Exemplo n.º 4
0
    def testAudioFileReaderLength(self):
        network = clam.Network()
        reader = network.AddProcessing("MonoAudioFileReader")
        config = clam.MonoAudioFileReaderConfig()
        config.SetSourceFile("trumpet.mp3")
        network.ConfigureProcessing(reader, clam.toProcessingConfig(config))
        self.assertEqual(
            2,
            int(network.GetProcessing(reader).GetHeader().GetLength() / 1000))

        reader = clam.MonoAudioFileReader()
        config = clam.MonoAudioFileReaderConfig()
        config.SetSourceFile("trumpet.mp3")
        reader.Configure(clam.toProcessingConfig(config))
        self.assertEqual(2, int(reader.GetHeader().GetLength() / 1000))
Exemplo n.º 5
0
 def testAudioFileReaderConfig(self):
     reader = clam.MonoAudioFileReader()
     config = clam.MonoAudioFileReaderConfig()
     self.assertEqual(False, reader.Configure(clam.toProcessingConfig(config)))
     config.SetSourceFile("trumpet.mp3")
     self.assertEqual(True, reader.Configure(clam.toProcessingConfig(config)))
Exemplo n.º 6
0
	def testConfigureProcessingFromTheNetwork(self):
		reader = self.network.AddProcessing( "MonoAudioFileReader" )
		config = clam.MonoAudioFileReaderConfig()
		self.assertEqual( False, self.network.ConfigureProcessing(reader,clam.toProcessingConfig(config)) )
		config.SetSourceFile( "trumpet.mp3" )
		self.assertEqual( True, self.network.ConfigureProcessing(reader,clam.toProcessingConfig(config)) )