summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBent Bisballe Nyeng <deva@aasimon.org>2017-04-29 22:26:14 +0200
committerBent Bisballe Nyeng <deva@aasimon.org>2017-04-29 22:26:40 +0200
commitc143b184223af3304c391537bcd7c563bb77609c (patch)
tree40fbf5222440bf047a1cd5f2f34a9a9356295749
parentd2875890165f245abb550678ae9e456881245fc2 (diff)
Keep sync on cache misses.
-rw-r--r--src/audiocache.cc2
1 files changed, 2 insertions, 0 deletions
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;
}