summaryrefslogtreecommitdiffstats
path: root/src/server/internals
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2012-07-25 23:13:09 +0000
committerDavid Robillard <d@drobilla.net>2012-07-25 23:13:09 +0000
commit59d70a37ca7a6c1601f437f7a9f99d77399c8d7d (patch)
tree7632e62be9fe5c0390fcd7162c0014dee7c1023a /src/server/internals
parent8d02ef7f4f1b938881ec3e78bcc9d79d569d53ec (diff)
downloadingen-59d70a37ca7a6c1601f437f7a9f99d77399c8d7d.tar.gz
ingen-59d70a37ca7a6c1601f437f7a9f99d77399c8d7d.tar.bz2
ingen-59d70a37ca7a6c1601f437f7a9f99d77399c8d7d.zip
Remove unnecessary NodeImpl::_srate field.
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@4552 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/server/internals')
-rw-r--r--src/server/internals/Delay.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/server/internals/Delay.cpp b/src/server/internals/Delay.cpp
index f825ffa5..d7cbcfb9 100644
--- a/src/server/internals/Delay.cpp
+++ b/src/server/internals/Delay.cpp
@@ -25,14 +25,15 @@
#include "raul/log.hpp"
#include "raul/midi_events.h"
-#include "internals/Delay.hpp"
#include "AudioBuffer.hpp"
#include "Driver.hpp"
+#include "Engine.hpp"
#include "InputPort.hpp"
#include "InternalPlugin.hpp"
#include "OutputPort.hpp"
#include "PatchImpl.hpp"
#include "ProcessContext.hpp"
+#include "internals/Delay.hpp"
#include "util.hpp"
#define LOG(s) s << "[DelayNode] "
@@ -104,7 +105,8 @@ void
DelayNode::activate(BufferFactory& bufs)
{
NodeImpl::activate(bufs);
- const SampleCount min_size = MAX_DELAY_SECONDS * _srate;
+ const SampleRate rate = bufs.engine().driver()->sample_rate();
+ const SampleCount min_size = MAX_DELAY_SECONDS * rate;
// Smallest power of two larger than min_size
SampleCount size = 1;
@@ -154,7 +156,7 @@ DelayNode::process(ProcessContext& context)
float* const out = out_buf->data();
const float delay_time = delay_buf->data()[0];
const uint32_t buffer_mask = plugin_data->_buffer_mask;
- const unsigned int sample_rate = plugin_data->_srate;
+ const SampleRate sample_rate = context.engine().driver()->sample_rate();
float delay_samples = plugin_data->_delay_samples;
int64_t write_phase = plugin_data->_write_phase;
const uint32_t sample_count = context.nframes();