summaryrefslogtreecommitdiff
path: root/src/sample.h
diff options
context:
space:
mode:
authorChristian Glöckner <cgloeckner@freenet.de>2016-03-29 17:37:49 +0200
committerAndré Nusser <andre.nusser@googlemail.com>2016-03-31 17:48:37 +0200
commitcf9874dfa5b528c0d6184aa5bb04b908272f2dcb (patch)
tree6d96fb0a487fd3ae86c1be8efa13e693da14651c /src/sample.h
parent852b31481189d6ff9e490533a598ee5154a044f5 (diff)
API Refactoring for class Sample
Diffstat (limited to 'src/sample.h')
-rw-r--r--src/sample.h28
1 files changed, 14 insertions, 14 deletions
diff --git a/src/sample.h b/src/sample.h
index 26c7be2..5b4f3b5 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,24 +32,26 @@
#include "channel.h"
#include "audiofile.h"
-typedef std::map< Channel*, AudioFile* > AudioFiles;
+typedef std::map<Channel*, AudioFile*> AudioFiles;
class InstrumentParser;
-class Sample {
- friend class InstrumentParser;
- friend class PowerList;
+class Sample
+{
+ 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* c);
private:
- void addAudioFile(InstrumentChannel *c, AudioFile *a);
+ void addAudioFile(InstrumentChannel* c, AudioFile* a);
- std::string name;
- float power;
- AudioFiles audiofiles;
+ std::string name;
+ float power;
+ AudioFiles audiofiles;
};
/*
@@ -62,4 +63,3 @@ private:
* <audiofile channel="Kick R-3" file="samples/1-kick-r-Kick R-3.wav"/>
* </sample>
*/
-#endif/*__DRUMGIZMO_SAMPLE_H__*/