summaryrefslogtreecommitdiff
path: root/src/audiocache.h
diff options
context:
space:
mode:
authorBent Bisballe Nyeng <deva@aasimon.org>2017-04-01 15:30:23 +0200
committerBent Bisballe Nyeng <deva@aasimon.org>2017-04-01 21:00:39 +0200
commit9774762dd014bed4f4e3c4ac142a7b9634944fe4 (patch)
tree684d1587b8a2ac2e1a9b7bd195090743cba4f74b /src/audiocache.h
parent32ad5ff14a03cdf049903523603c6b7a83dd7a5a (diff)
Update underrun counter directly in AudioCache.
Diffstat (limited to 'src/audiocache.h')
-rw-r--r--src/audiocache.h12
1 files changed, 4 insertions, 8 deletions
diff --git a/src/audiocache.h b/src/audiocache.h
index d0be509..761f2b2 100644
--- a/src/audiocache.h
+++ b/src/audiocache.h
@@ -36,12 +36,13 @@
#include "audiocachefile.h"
#include "audiocacheidmanager.h"
#include "audiocacheeventhandler.h"
+#include "settings.h"
#define CHUNK_MULTIPLIER 16
class AudioCache {
public:
- AudioCache() = default;
+ AudioCache(Settings& settings);
//! Destroy object and stop thread if needed.
~AudioCache();
@@ -97,18 +98,13 @@ public:
void setAsyncMode(bool async);
bool isAsyncMode() const;
- //! Return the number of chunks that were read too late.
- size_t getNumberOfUnderruns() const;
-
- //! Set underrun counter to 0.
- void resetNumberOfUnderruns();
-
private:
size_t framesize{0};
sample_t* nodata{nullptr};
size_t nodata_framesize{0};
- size_t number_of_underruns{0};
AudioCacheIDManager id_manager;
AudioCacheEventHandler event_handler{id_manager};
+
+ Settings& settings;
};