From 3a1d393a0f40ff3127689c8af2508682daa4a4b0 Mon Sep 17 00:00:00 2001 From: lwvmobile Date: Fri, 20 Jun 2025 16:05:30 -0400 Subject: [PATCH] Fix Playback Speed in Cygwin for .imb/.amb files; #297 --- src/dsd_audio.c | 2 +- src/dsd_main.c | 10 +++++++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/dsd_audio.c b/src/dsd_audio.c index 3258efb..282c234 100644 --- a/src/dsd_audio.c +++ b/src/dsd_audio.c @@ -236,7 +236,7 @@ void openOSSOutput (dsd_opts * opts) } } - if (opts->audio_in_type != 5) //split == 1 + if (opts->audio_in_type != 5 || opts->split == 1) //split == 1 { if((strncmp(opts->audio_out_dev, "/dev/dsp", 8) == 0)) diff --git a/src/dsd_main.c b/src/dsd_main.c index 606a27a..98cc9c9 100644 --- a/src/dsd_main.c +++ b/src/dsd_main.c @@ -3503,9 +3503,10 @@ //this will only open OSS output if its listed as a type //changed to this so I could call it freely inside of ncurses terminal - openOSSOutput(&opts); + if (opts.playfiles == 0) + openOSSOutput(&opts); - if (opts.playfiles == 1) //redo? + if (opts.playfiles == 1) { opts.split = 1; opts.playoffset = 0; @@ -3513,7 +3514,10 @@ opts.delay = 0; opts.pulse_digi_rate_out = 8000; opts.pulse_digi_out_channels = 1; - if (opts.audio_out_type == 0) openPulseOutput(&opts); + if (opts.audio_out_type == 0) + openPulseOutput(&opts); + else if((strncmp(opts.audio_out_dev, "/dev/dsp", 8) == 0)) + openOSSOutput(&opts); //open after split == 1 so it will open and playback at the proper speed } //this particular if-elseif-else could be rewritten to be a lot neater and simpler