예제 #1
0
 def test_peak_normalize_no_change(self):
     samples = self.make_test_sine(44100, 100)
     samplesNorm = AudioBuffer.peak_normalize(samples)
     np.testing.assert_array_almost_equal(samples, samplesNorm, decimal=5)
예제 #2
0
 def test_peak_normalize(self):
     samples = self.make_test_sine(44100, 100)
     samplesHalfAmp = samples * 0.5
     samplesNorm = AudioBuffer.peak_normalize(samples)
     np.testing.assert_array_equal(samples, samplesNorm)