Commit 02e78c2e authored by TYAGIRIS's avatar TYAGIRIS
Browse files

merge isar mr

parent abae3fe9
Loading
Loading
Loading
Loading
+9 −19
Original line number Diff line number Diff line
@@ -724,9 +724,6 @@ class MLDConformance:

            for ch in range(nChans):
                mldFile = os.path.join(
                    tmpdir, f"{tempfile.gettempprefix()}_ch{ch}_MLD.csv"
                )
                mldFile2 = os.path.join(
                    tmpdir, f"{tempfile.gettempprefix()}_ch{ch}_MLD2.txt"
                )                
                refFileMono = os.path.join(
@@ -737,15 +734,6 @@ class MLDConformance:
                )
                writefile(refFileMono, refSamples[:, ch], 48000)
                writefile(dutFileMono, dutSamples[:, ch], 48000)
                command = [
                    self.mldbin,
                    "-o",
                    mldFile,
                    "-s",
                    refFileMono,
                    dutFileMono,
                ]
                self.process(" ".join(command))

                command = [
                    self.wavdiffbin,
@@ -753,19 +741,21 @@ class MLDConformance:
                    refFileMono,
                    dutFileMono,
                ]
                with open(mldFile2, "w") as fd:

                with open(mldFile, "w") as fd:
                    c = subprocess.run(
                    " ".join(command), stdout=fd, stderr=subprocess.STDOUT, text=True, shell=True
                    )
                    if c.returncode:
                        with open(self.failedCmdsFile, "a") as f:
                            f.write(command + "\n")
                        self.failedTests.value += 1

                    mldThisChan = np.loadtxt(mldFile2, delimiter=";", dtype=float, skiprows=1)
                    #if c.returncode:
                    #    with open(self.failedCmdsFile, "a") as f:
                    #        f.write(command + "\n")
                    #    self.failedTests.value += 1

                    mldThisChan = np.loadtxt(mldFile, delimiter=";", dtype=float, skiprows=1)
                    mldThisChan = mldThisChan[:, 2]
                    fd.close()
                mldThisChan2 = np.loadtxt(mldFile, delimiter=" ", dtype=float)

                if ch == 0:
                    mldThisFile = mldThisChan
                else: