From 765f9ad4c8e60a4ac59f127c83d9f253f4550fc2 Mon Sep 17 00:00:00 2001 From: Sami Farin Date: Sat, 18 Jan 2025 21:51:14 +0200 Subject: [PATCH] fix non-planar sample offset calculation (channel switching did not work) --- src/spek-audio.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/spek-audio.cc b/src/spek-audio.cc index 5bb18b6..a52b2c7 100644 --- a/src/spek-audio.cc +++ b/src/spek-audio.cc @@ -313,7 +313,7 @@ int AudioFileImpl::read() offset = sample; } else { data = this->frame->data[0]; - offset = sample * this->channels; + offset = sample * this->channels + this->channel; } float value; switch (format) {