summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBent Bisballe Nyeng <deva@aasimon.org>2017-05-07 15:24:07 +0200
committerBent Bisballe Nyeng <deva@aasimon.org>2017-05-07 15:24:07 +0200
commitba2160774af945e9ac6a46714833ab2d231b00fe (patch)
treeb2c8b78f1116a561dbc6854b34d6a117b9f00fed
parentc31d41e161b4c2a7e26e3564c6e323c1e2787e74 (diff)
Add additional underrun increments.
-rw-r--r--src/audiocache.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/audiocache.cc b/src/audiocache.cc
index e317851..e3be20b 100644
--- a/src/audiocache.cc
+++ b/src/audiocache.cc
@@ -72,6 +72,7 @@ sample_t* AudioCache::open(const AudioFile& file,
if(!file.isValid())
{
+ settings.number_of_underruns.fetch_add(1);
// File preload not yet ready - skip this sample.
id = CACHE_DUMMYID;
assert(nodata);
@@ -84,6 +85,7 @@ sample_t* AudioCache::open(const AudioFile& file,
// If we are out of available ids we get CACHE_DUMMYID
if(id == CACHE_DUMMYID)
{
+ settings.number_of_underruns.fetch_add(1);
// Use nodata buffer instead.
assert(nodata);
return nodata;
@@ -154,6 +156,7 @@ sample_t* AudioCache::next(cacheid_t id, std::size_t& size)
if(id == CACHE_DUMMYID)
{
+ settings.number_of_underruns.fetch_add(1);
assert(nodata);
return nodata;
}