From e436e02f164977bb41f2740b5ad59fc89a1a1490 Mon Sep 17 00:00:00 2001 From: Bent Bisballe Nyeng Date: Thu, 12 Jan 2012 16:30:07 +0100 Subject: Changed instrument list to containing pointers. --- drumgizmo/audioinputenginedl.cc | 2 +- src/drumkit.h | 2 ++ vst/input_vst.cc | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/drumgizmo/audioinputenginedl.cc b/drumgizmo/audioinputenginedl.cc index 3b2a483..799e56f 100644 --- a/drumgizmo/audioinputenginedl.cc +++ b/drumgizmo/audioinputenginedl.cc @@ -118,7 +118,7 @@ bool AudioInputEngineDL::init(Instruments &instruments) { char **n = (char**)malloc(sizeof(char*)*instruments.size()); for(size_t i = 0; i < instruments.size(); i++) { - n[i] = strdup(instruments[i].name().c_str()); + n[i] = strdup(instruments[i]->name().c_str()); } bool ret = i_init(ptr, instruments.size(), n); diff --git a/src/drumkit.h b/src/drumkit.h index f9883b6..d25b6b3 100644 --- a/src/drumkit.h +++ b/src/drumkit.h @@ -37,6 +37,8 @@ class DrumKitParser; class DrumKit { friend class DrumKitParser; public: + ~DrumKit(); + std::string name(); std::string description(); diff --git a/vst/input_vst.cc b/vst/input_vst.cc index 52015ad..525c687 100644 --- a/vst/input_vst.cc +++ b/vst/input_vst.cc @@ -45,7 +45,7 @@ bool InputVST::init(Instruments &instruments) mmap.midimap = p.midimap; for(size_t i = 0; i < instruments.size(); i++) { - mmap.instrmap[instruments[i].name()] = i; + mmap.instrmap[instruments[i]->name()] = i; } return true; -- cgit v1.2.3