summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/drumkitparser.cc1
-rw-r--r--src/instrument.cc5
-rw-r--r--src/instrument.h3
3 files changed, 8 insertions, 1 deletions
diff --git a/src/drumkitparser.cc b/src/drumkitparser.cc
index 4085ea2..63c4471 100644
--- a/src/drumkitparser.cc
+++ b/src/drumkitparser.cc
@@ -232,6 +232,7 @@ void DrumKitParser::endTag(std::string name)
if(name == "instrument") {
Instrument *i = new Instrument();
+ i->setName(instr_name);
i->setDescription(instr_description);
i->setGroup(instr_group);
// Instrument &i = kit.instruments[kit.instruments.size() - 1];
diff --git a/src/instrument.cc b/src/instrument.cc
index 2e010e6..12d5af3 100644
--- a/src/instrument.cc
+++ b/src/instrument.cc
@@ -141,6 +141,11 @@ void Instrument::setGroup(std::string g)
_group = g;
}
+void Instrument::setName(std::string n)
+{
+ _name = n;
+}
+
void Instrument::setDescription(std::string d)
{
_description = d;
diff --git a/src/instrument.h b/src/instrument.h
index 7c8b8dc..46e95f9 100644
--- a/src/instrument.h
+++ b/src/instrument.h
@@ -51,7 +51,7 @@ public:
void setGroup(std::string group);
void setDescription(std::string description);
-
+ void setName(std::string name);
// std::map<std::string, std::string> channelmap;
std::vector<AudioFile*> audiofiles;
@@ -62,6 +62,7 @@ private:
void *magic;
std::string _id;
+ std::string _name;
std::string _description;
std::string _group;