From 5ab5afc95fccebd4e1e4c1237d8ddc9d6bf3f4d4 Mon Sep 17 00:00:00 2001 From: Thomas Perl Date: Fri, 23 Jan 2026 15:11:47 +0100 Subject: [PATCH 1/2] Fix debug output formatting (sample_file vs self->filename) --- src/format_mp3.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/format_mp3.c b/src/format_mp3.c index dd02ea4..aa93638 100644 --- a/src/format_mp3.c +++ b/src/format_mp3.c @@ -203,7 +203,7 @@ mp3_write_file(OpenedAudioFile *self, const char *output_filename, unsigned long report_progress(1.0, report_progress_user_data); #if defined(WAVBREAKER_MP3_DEBUG) - g_debug("Wrote %d MP3 frames from '%s' to '%s'", frames_written, sample_file, output_filename); + g_debug("Wrote %d MP3 frames from '%s' to '%s'", frames_written, self->filename, output_filename); #endif /* WAVBREAKER_MP3_DEBUG */ fclose(output_file); From 6d3416bdb24925d2ec18e7028659224b94ac18fb Mon Sep 17 00:00:00 2001 From: Thomas Perl Date: Fri, 23 Jan 2026 15:13:11 +0100 Subject: [PATCH 2/2] Fix preview of MP3 files using mpg123 --- CHANGELOG.md | 1 + src/format_mp3.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b8a5d52..a976a10 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,7 @@ The format mostly follows [Keep a Changelog](https://keepachangelog.com/en/1.0.0 ### Fixed * Importing of track breaks via CUE file now works with any well formatted CUE file +* mpg123-based MP3 playback live preview fix (mono vs stereo channel count bug) ## [0.16] -- 2022-12-20 diff --git a/src/format_mp3.c b/src/format_mp3.c index aa93638..cf65158 100644 --- a/src/format_mp3.c +++ b/src/format_mp3.c @@ -307,7 +307,7 @@ mp3_open_file(const FormatModule *self, const char *filename, char **error_messa mpg123_format_none(mp3->mpg123); if (mpg123_format(mp3->mpg123, si->samplesPerSec, - (si->channels == 1) ? MPG123_STEREO : MPG123_MONO, + (si->channels == 1) ? MPG123_MONO : MPG123_STEREO, MPG123_ENC_SIGNED_16) != MPG123_OK) { format_module_set_error_message(error_message, "Failed to set mpg123 format"); goto error;