From c143b184223af3304c391537bcd7c563bb77609c Mon Sep 17 00:00:00 2001 From: Bent Bisballe Nyeng Date: Sat, 29 Apr 2017 22:26:14 +0200 Subject: Keep sync on cache misses. --- src/audiocache.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/audiocache.cc b/src/audiocache.cc index 73ceadb..e317851 100644 --- a/src/audiocache.cc +++ b/src/audiocache.cc @@ -191,6 +191,7 @@ sample_t* AudioCache::next(cacheid_t id, std::size_t& size) { // Just return silence. settings.number_of_underruns.fetch_add(1); + c.localpos += framesize; // Skip these samples so we don't loose sync. assert(nodata); return nodata; } @@ -206,6 +207,7 @@ sample_t* AudioCache::next(cacheid_t id, std::size_t& size) { // Just return silence. settings.number_of_underruns.fetch_add(1); + c.localpos += framesize; // Skip these samples so we don't loose sync. assert(nodata); return nodata; } -- cgit v1.2.3