Commit ada04429 authored by norvell's avatar norvell
Browse files

Merge branch 'ci/fix-mld' into 'main'

[CI] Fix MLD calculation in audioarray.compare, called from cmp_pcm.py.

See merge request !1550
parents 09570f9a 1ae79a3a
Loading
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -334,8 +334,8 @@ def compare(
                for i in range(nchannels):
                    tmpfile_ref = Path(tmpdir).joinpath(f"ref_ch{i+1}.wav")
                    tmpfile_test = Path(tmpdir).joinpath(f"test_ch{i+1}.wav")
                    r48 = resample(ref[:, i], fs, 48000)
                    t48 = resample(test[:, i], fs, 48000)
                    r48 = resample(ref[:, i].astype(float), fs, 48000).astype(np.dtype('int16')) # Convert to float for resample, then to int16 for wavfile.write
                    t48 = resample(test[:, i].astype(float), fs, 48000).astype(np.dtype('int16'))
                    wavfile.write(str(tmpfile_ref), 48000, r48)
                    wavfile.write(str(tmpfile_test), 48000, t48)
                    out = subprocess.check_output([mld, tmpfile_ref, tmpfile_test])