]> git.unchartedbackwaters.co.uk Git - francis/winuae.git/commitdiff
Audio pull mode check.
authorToni Wilen <twilen@winuae.net>
Sun, 11 Sep 2016 15:44:54 +0000 (18:44 +0300)
committerToni Wilen <twilen@winuae.net>
Sun, 11 Sep 2016 15:44:54 +0000 (18:44 +0300)
custom.cpp

index 308bf77bd2c9fd7f0b093231c88430541d08affc..98fdd1daa6437b2571a3eaefed7a636bf4269d37 100644 (file)
@@ -7225,6 +7225,8 @@ static bool framewait (void)
                                show_screen (2);
                }
 
+               maybe_process_pull_audio();
+
                int legacy_avg = mavg (&ma_legacy, t, MAVG_VSYNC_SIZE);
                if (t > legacy_avg)
                        legacy_avg = t;
@@ -8338,6 +8340,7 @@ static void hsync_handler_post (bool onvsync)
                if (vpos == 0)
                        nextwaitvpos = maxvpos_display * 1 / 4;
                if (audio_is_pull() > 0 && !currprefs.turbo_emulation) {
+                       maybe_process_pull_audio();
                        frame_time_t rpt = read_processor_time();
                        while (audio_pull_buffer() > 1 && (!isvsync() || (!vsync_isdone() && (int)vsyncmintime - (int)(rpt + vsynctimebase / 10) > 0 && (int)vsyncmintime - (int)rpt < vsynctimebase))) {
                                cpu_sleep_millis(1);