示例#1
0
 def test_concat_raises_for_different_sample_rates(self):
     s1 = AudioSamples(np.zeros(44100 * 2), SR44100())
     s2 = AudioSamples(np.zeros(44100), SR11025())
     self.assertRaises(ValueError, lambda: AudioSamples.concat([s1, s2]))
示例#2
0
 def test_instance_concat_returns_audio_samples(self):
     s1 = AudioSamples(np.zeros(44100 * 2), SR44100())
     s2 = AudioSamples(np.zeros(44100), SR44100())
     s3 = s1.concat([s1, s2])
     self.assertIsInstance(s3, AudioSamples)
     self.assertEqual(44100 * 3, len(s3))