summaryrefslogtreecommitdiff
path: root/src/drumkit.cc
diff options
context:
space:
mode:
authorBent Bisballe Nyeng <deva@aasimon.org>2017-03-20 20:06:03 +0100
committerBent Bisballe Nyeng <deva@aasimon.org>2017-03-23 20:17:53 +0100
commita6c134a82143acd32f80b2f9679f8fcf194a5402 (patch)
treeda8da776f2a5ea8533641a886ee7c963c016f95b /src/drumkit.cc
parent7860651ee543385bb6d1c229312b20e78150f118 (diff)
Add file counter methods to DrumKit and Instrument classes.
Diffstat (limited to 'src/drumkit.cc')
-rw-r--r--src/drumkit.cc14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/drumkit.cc b/src/drumkit.cc
index 1dadf04..abef1b8 100644
--- a/src/drumkit.cc
+++ b/src/drumkit.cc
@@ -68,7 +68,19 @@ std::string DrumKit::getDescription() const
return _description;
}
-size_t DrumKit::getSamplerate() const
+std::size_t DrumKit::getSamplerate() const
{
return _samplerate;
}
+
+std::size_t DrumKit::getNumberOfFiles() const
+{
+ std::size_t number_of_files = 0;
+
+ for(const auto & instrument : instruments)
+ {
+ number_of_files += instrument->getNumberOfFiles();
+ }
+
+ return number_of_files;
+}