From f9a5d5371286e5932a144e8b486593417756f59b Mon Sep 17 00:00:00 2001 From: Toni Wilen Date: Fri, 6 Jul 2018 10:39:49 +0300 Subject: [PATCH] Added missing checks that prevented cd_audio_mode_changed=true detection in some situations. --- od-win32/blkdev_win32_ioctl.cpp | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/od-win32/blkdev_win32_ioctl.cpp b/od-win32/blkdev_win32_ioctl.cpp index c14ded99..d6319b0d 100644 --- a/od-win32/blkdev_win32_ioctl.cpp +++ b/od-win32/blkdev_win32_ioctl.cpp @@ -529,8 +529,13 @@ static bool cdda_play2 (struct dev_info_ioctl *ciw, int *outpos) while (ciw->cdda_play > 0) { if (mode) { - while (cda_bufon[bufnum] && ciw->cdda_play > 0) + while (cda_bufon[bufnum] && ciw->cdda_play > 0) { + if (cd_audio_mode_changed) { + restart = true; + goto end; + } sleep_millis(10); + } } else { cda->wait(bufnum); } @@ -702,8 +707,10 @@ static bool cdda_play2 (struct dev_info_ioctl *ciw, int *outpos) } } - while (ciw->cdda_paused && ciw->cdda_play == oldplay) - sleep_millis(10); + if (cda_bufon[0] == 0 && cda_bufon[1] == 0) { + while (ciw->cdda_paused && ciw->cdda_play == oldplay) + sleep_millis(10); + } if (cd_audio_mode_changed) { restart = true; -- 2.47.3