diff options
author | Bent Bisballe Nyeng <deva@aasimon.org> | 2017-04-01 15:30:23 +0200 |
---|---|---|
committer | Bent Bisballe Nyeng <deva@aasimon.org> | 2017-04-01 21:00:39 +0200 |
commit | 9774762dd014bed4f4e3c4ac142a7b9634944fe4 (patch) | |
tree | 684d1587b8a2ac2e1a9b7bd195090743cba4f74b /test/audiocachetest.cc | |
parent | 32ad5ff14a03cdf049903523603c6b7a83dd7a5a (diff) |
Update underrun counter directly in AudioCache.
Diffstat (limited to 'test/audiocachetest.cc')
-rw-r--r-- | test/audiocachetest.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/test/audiocachetest.cc b/test/audiocachetest.cc index b194b14..ae3e8f2 100644 --- a/test/audiocachetest.cc +++ b/test/audiocachetest.cc @@ -28,6 +28,7 @@ #include <audiofile.h> #include <audiocache.h> +#include <settings.h> #include <unistd.h> #include "drumkit_creator.h" @@ -68,7 +69,8 @@ public: printf("audio_file.load\n"); audio_file.load(4096); - AudioCache audio_cache; + Settings settings; + AudioCache audio_cache(settings); printf("audio_cache.init\n"); audio_cache.init(100); audio_cache.setAsyncMode(threaded); @@ -115,7 +117,7 @@ public: samples = audio_cache.next(id, size); - CPPUNIT_ASSERT_EQUAL(0, (int)audio_cache.getNumberOfUnderruns()); + CPPUNIT_ASSERT_EQUAL(std::size_t(0), settings.number_of_underruns.load()); for(size_t i = 0; (i < size) && (offset < audio_file_ref.size); ++i) { |