summaryrefslogtreecommitdiff
path: root/src/drumgizmo.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/drumgizmo.cc')
-rw-r--r--src/drumgizmo.cc34
1 files changed, 17 insertions, 17 deletions
diff --git a/src/drumgizmo.cc b/src/drumgizmo.cc
index 2658754..4109249 100644
--- a/src/drumgizmo.cc
+++ b/src/drumgizmo.cc
@@ -103,7 +103,7 @@ bool DrumGizmo::loadkit(std::string file)
#ifdef WITH_RESAMPLER
for(int i = 0; i < MAX_NUM_CHANNELS; ++i)
{
- resampler[i].setup(kit.samplerate(), Conf::samplerate);
+ resampler[i].setup(kit.getSamplerate(), Conf::samplerate);
}
#endif/*WITH_RESAMPLER*/
@@ -162,14 +162,14 @@ void DrumGizmo::handleMessage(Message *msg)
if(ie->isMidiEngine())
{
AudioInputEngineMidi *aim = (AudioInputEngineMidi*)ie;
- mmapfile = aim->midimapFile();
+ mmapfile = aim->getMidimapFile();
mmap_loaded = aim->isValid();
}
EngineSettingsMessage *msg = new EngineSettingsMessage();
msg->midimapfile = mmapfile;
msg->midimap_loaded = mmap_loaded;
- msg->drumkitfile = kit.file();
+ msg->drumkitfile = kit.getFile();
msg->drumkit_loaded = loader.isDone();
msg->enable_velocity_modifier = Conf::enable_velocity_modifier;
msg->velocity_modifier_falloff = Conf::velocity_modifier_falloff;
@@ -203,7 +203,7 @@ void DrumGizmo::handleMessage(Message *msg)
void DrumGizmo::setFrameSize(size_t framesize)
{
// If we are resampling override the frame size.
- if(resampler[0].ratio() != 1)
+ if(resampler[0].getRatio() != 1)
{
framesize = RESAMPLER_INPUT_BUFFER;
}
@@ -306,7 +306,7 @@ bool DrumGizmo::run(size_t pos, sample_t *samples, size_t nsamples)
continue;
}
- if(i->group() != "")
+ if(i->getGroup() != "")
{
// Add event to ramp down all existing events with the same groupname.
Channels::iterator j = kit.channels.begin();
@@ -317,10 +317,10 @@ bool DrumGizmo::run(size_t pos, sample_t *samples, size_t nsamples)
while(evs != activeevents[ch.num].end())
{
Event *ev = *evs;
- if(ev->type() == Event::sample)
+ if(ev->getType() == Event::sample)
{
EventSample *sev = (EventSample*)ev;
- if(sev->group == i->group() && sev->instrument != i)
+ if(sev->group == i->getGroup() && sev->instrument != i)
{
sev->rampdown = 3000; // Ramp down 3000 samples
// TODO: This must be configurable at some point...
@@ -360,8 +360,8 @@ bool DrumGizmo::run(size_t pos, sample_t *samples, size_t nsamples)
else
{
//DEBUG(drumgizmo, "Adding event %d.\n", event.offset);
- Event *evt = new EventSample(ch.num, 1.0, af, i->group(), i);
- evt->offset = (event.offset + pos) * resampler[0].ratio();
+ Event *evt = new EventSample(ch.num, 1.0, af, i->getGroup(), i);
+ evt->offset = (event.offset + pos) * resampler[0].getRatio();
activeevents[ch.num].push_back(evt);
}
++j;
@@ -401,7 +401,7 @@ bool DrumGizmo::run(size_t pos, sample_t *samples, size_t nsamples)
//
#ifdef WITH_RESAMPLER
if((Conf::enable_resampling == false) ||
- (resampler[0].ratio() == 1.0)) // No resampling needed
+ (resampler[0].getRatio() == 1.0)) // No resampling needed
{
#endif
for(size_t c = 0; c < kit.channels.size(); ++c)
@@ -446,7 +446,7 @@ bool DrumGizmo::run(size_t pos, sample_t *samples, size_t nsamples)
}
// Process channel data
- size_t kitpos = pos * resampler[0].ratio();
+ size_t kitpos = pos * resampler[0].getRatio();
size_t insize = sizeof(resampler_input_buffer[0]) / sizeof(sample_t);
while(resampler[0].getOutputSampleCount() > 0)
@@ -500,7 +500,7 @@ void DrumGizmo::getSamples(int ch, int pos, sample_t* s, size_t sz)
Event* event = *i;
- Event::type_t type = event->type();
+ Event::type_t type = event->getType();
switch(type) {
case Event::sample:
{
@@ -648,9 +648,9 @@ void DrumGizmo::setSamplerate(int samplerate)
#ifdef WITH_RESAMPLER
for(int i = 0; i < MAX_NUM_CHANNELS; ++i)
{
- resampler[i].setup(kit.samplerate(), Conf::samplerate);
+ resampler[i].setup(kit.getSamplerate(), Conf::samplerate);
}
- if(resampler[0].ratio() != 1)
+ if(resampler[0].getRatio() != 1)
{
setFrameSize(RESAMPLER_INPUT_BUFFER);
}
@@ -685,12 +685,12 @@ std::string DrumGizmo::configString()
if(ie->isMidiEngine())
{
AudioInputEngineMidi *aim = (AudioInputEngineMidi*)ie;
- mmapfile = aim->midimapFile();
+ mmapfile = aim->getMidimapFile();
}
return
"<config>\n"
- " <value name=\"drumkitfile\">" + kit.file() + "</value>\n"
+ " <value name=\"drumkitfile\">" + kit.getFile() + "</value>\n"
" <value name=\"midimapfile\">" + mmapfile + "</value>\n"
" <value name=\"enable_velocity_modifier\">" +
bool2str(Conf::enable_velocity_modifier) + "</value>\n"
@@ -754,7 +754,7 @@ bool DrumGizmo::setConfigString(std::string cfg)
}
std::string newkit = p.value("drumkitfile");
- if(newkit != "" && kit.file() != newkit)
+ if(newkit != "" && kit.getFile() != newkit)
{
/*
if(!loadkit(p.values["drumkitfile"]))