summaryrefslogtreecommitdiffstats
path: root/src/libs/engine/DuplexPort.cpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2007-04-08 19:33:14 +0000
committerDavid Robillard <d@drobilla.net>2007-04-08 19:33:14 +0000
commitc34d7b6e9354529b6e83c136857e798c63b256fe (patch)
tree5ff63c162597f026f81c82e22a77e02b7da10eea /src/libs/engine/DuplexPort.cpp
parent40e4cf5d669a654728881a00a3659fc3bca0e546 (diff)
downloadingen-c34d7b6e9354529b6e83c136857e798c63b256fe.tar.gz
ingen-c34d7b6e9354529b6e83c136857e798c63b256fe.tar.bz2
ingen-c34d7b6e9354529b6e83c136857e798c63b256fe.zip
Fixed audio output.
git-svn-id: http://svn.drobilla.net/lad/ingen@425 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/libs/engine/DuplexPort.cpp')
-rw-r--r--src/libs/engine/DuplexPort.cpp26
1 files changed, 12 insertions, 14 deletions
diff --git a/src/libs/engine/DuplexPort.cpp b/src/libs/engine/DuplexPort.cpp
index c498c774..a71f18b8 100644
--- a/src/libs/engine/DuplexPort.cpp
+++ b/src/libs/engine/DuplexPort.cpp
@@ -43,26 +43,24 @@ DuplexPort::DuplexPort(Node* parent, const string& name, size_t index, size_t po
void
DuplexPort::pre_process(SampleCount nframes, FrameTime start, FrameTime end)
{
- if (_is_output) {
- for (size_t i=0; i < _poly; ++i)
- _buffers.at(i)->prepare_write(nframes);
- } else {
- for (size_t i=0; i < _poly; ++i)
- _buffers.at(i)->prepare_read(nframes);
- }
+ // Think about it...
+
+ if (_is_output)
+ InputPort::pre_process(nframes, start, end);
+ else
+ OutputPort::pre_process(nframes, start, end);
}
void
DuplexPort::post_process(SampleCount nframes, FrameTime start, FrameTime end)
{
- if (_is_output) {
- for (size_t i=0; i < _poly; ++i)
- _buffers.at(i)->prepare_read(nframes);
- } else {
- for (size_t i=0; i < _poly; ++i)
- _buffers.at(i)->prepare_write(nframes);
- }
+ // Think about it...
+
+ if (_is_output)
+ InputPort::pre_process(nframes, start, end);
+ else
+ OutputPort::pre_process(nframes, start, end);
}