summaryrefslogtreecommitdiff
path: root/src/sample.h
diff options
context:
space:
mode:
authorBent Bisballe Nyeng <deva@aasimon.org>2016-03-23 21:57:41 +0100
committerBent Bisballe Nyeng <deva@aasimon.org>2016-03-29 22:43:32 +0200
commit6ac5946767ba41d7eff9eb8521519007fdc58750 (patch)
tree3ea70169dfe7568fa97c54c19a6f2de5189ef249 /src/sample.h
parentef1d7e4478649296ccb17900acc949a604097d66 (diff)
More cleanup.
Diffstat (limited to 'src/sample.h')
-rw-r--r--src/sample.h36
1 files changed, 12 insertions, 24 deletions
diff --git a/src/sample.h b/src/sample.h
index 26c7be2..f00db13 100644
--- a/src/sample.h
+++ b/src/sample.h
@@ -24,8 +24,7 @@
* along with DrumGizmo; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*/
-#ifndef __DRUMGIZMO_SAMPLE_H__
-#define __DRUMGIZMO_SAMPLE_H__
+#pragma once
#include <map>
#include <string>
@@ -33,33 +32,22 @@
#include "channel.h"
#include "audiofile.h"
-typedef std::map< Channel*, AudioFile* > AudioFiles;
+using AudioFiles = std::map<Channel*, AudioFile*>;
-class InstrumentParser;
class Sample {
- friend class InstrumentParser;
- friend class PowerList;
+ friend class InstrumentParser;
+ friend class PowerList;
public:
- Sample(std::string name, float power);
- ~Sample();
+ Sample(const std::string& name, float power);
+ ~Sample();
- AudioFile *getAudioFile(InstrumentChannel *c);
+ AudioFile* getAudioFile(InstrumentChannel *instrument_channel);
private:
- void addAudioFile(InstrumentChannel *c, AudioFile *a);
+ void addAudioFile(InstrumentChannel* instrument_channel,
+ AudioFile* audio_file);
- std::string name;
- float power;
- AudioFiles audiofiles;
+ std::string name;
+ float power;
+ AudioFiles audiofiles;
};
-
-/*
- * <sample name="kick-r-1">
- * <audiofile channel="Alesis-3" file="samples/1-kick-r-Alesis-3.wav"/>
- * <audiofile channel="Amb L-3" file="samples/1-kick-r-Amb L-3.wav"/>
- * <audiofile channel="Amb R-3" file="samples/1-kick-r-Amb R-3.wav"/>
- * <audiofile channel="Kick L-3" file="samples/1-kick-r-Kick L-3.wav"/>
- * <audiofile channel="Kick R-3" file="samples/1-kick-r-Kick R-3.wav"/>
- * </sample>
- */
-#endif/*__DRUMGIZMO_SAMPLE_H__*/