From a6c134a82143acd32f80b2f9679f8fcf194a5402 Mon Sep 17 00:00:00 2001 From: Bent Bisballe Nyeng Date: Mon, 20 Mar 2017 20:06:03 +0100 Subject: Add file counter methods to DrumKit and Instrument classes. --- src/instrument.cc | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/instrument.cc') diff --git a/src/instrument.cc b/src/instrument.cc index 5c96c6d..466acc1 100644 --- a/src/instrument.cc +++ b/src/instrument.cc @@ -117,3 +117,10 @@ void Instrument::setGroup(const std::string& g) { _group = g; } + +std::size_t Instrument::getNumberOfFiles() const +{ + // Note: Each AudioFile instance contains just a single channel even for + // multi-channel files. + return audiofiles.size(); +} -- cgit v1.2.3