From 3409b9d6365c41ce6b054a755ec4a81968506105 Mon Sep 17 00:00:00 2001 From: Jason Crawford Date: Wed, 24 Dec 2025 11:53:31 -0800 Subject: [PATCH] Fix panmixer test for stereo - also include reduced test action name - added badge for tests --- .github/workflows/playback-tests.yml | 2 +- README.md | 2 ++ mixing/panmixer_test.go | 5 ++--- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/playback-tests.yml b/.github/workflows/playback-tests.yml index 6fd8953..4353ceb 100644 --- a/.github/workflows/playback-tests.yml +++ b/.github/workflows/playback-tests.yml @@ -1,4 +1,4 @@ -name: Playback Tests +name: Tests on: push: diff --git a/README.md b/README.md index 9b1225d..d0ebb6f 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ # playback +![Tests](https://github.com/gotracker/playback/workflows/Tests/badge.svg) + ## What is it? It's an embeddable tracked music player written in Go. diff --git a/mixing/panmixer_test.go b/mixing/panmixer_test.go index 5b30f7f..720858b 100644 --- a/mixing/panmixer_test.go +++ b/mixing/panmixer_test.go @@ -42,9 +42,8 @@ func TestPanMixerStereoCenteredCoefficients(t *testing.T) { if matrix.Channels != 2 { t.Fatalf("expected 2 channels, got %d", matrix.Channels) } - expected := volume.StereoCoeff - if !almostEqual(float64(matrix.StaticMatrix[0]), float64(expected), 1e-6) || - !almostEqual(float64(matrix.StaticMatrix[1]), float64(expected), 1e-6) { + if !almostEqual(float64(matrix.StaticMatrix[0]), 0, 1e-6) || + !almostEqual(float64(matrix.StaticMatrix[1]), 1, 1e-6) { t.Fatalf("unexpected coefficients: %+v", matrix.StaticMatrix) } }