From 12bf3e4824e190e099ee53b13b828ce19b435d20 Mon Sep 17 00:00:00 2001 From: Gregor Richards Date: Tue, 13 Sep 2016 21:45:06 -0400 Subject: [PATCH] Rather than repeating the same sample for every frame while stalled, just pause the sound while stalled. Both options are annoying, but this option is less annoying. --- network/netplay/netplay.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/network/netplay/netplay.c b/network/netplay/netplay.c index 48a50c4f3d..f56da9fd34 100644 --- a/network/netplay/netplay.c +++ b/network/netplay/netplay.c @@ -464,14 +464,14 @@ void video_frame_net(const void *data, unsigned width, void audio_sample_net(int16_t left, int16_t right) { netplay_t *netplay = (netplay_t*)netplay_data; - if (!netplay_should_skip(netplay)) + if (!netplay_should_skip(netplay) && !netplay->stall) netplay->cbs.sample_cb(left, right); } size_t audio_sample_batch_net(const int16_t *data, size_t frames) { netplay_t *netplay = (netplay_t*)netplay_data; - if (!netplay_should_skip(netplay)) + if (!netplay_should_skip(netplay) && !netplay->stall) return netplay->cbs.sample_batch_cb(data, frames); return frames; }