summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-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;
}