summaryrefslogtreecommitdiffstats
path: root/src/libs/engine
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2007-10-08 00:50:13 +0000
committerDavid Robillard <d@drobilla.net>2007-10-08 00:50:13 +0000
commita421a44310ee472fbee15f150d32b826a8371dbf (patch)
treed160bb1704a26524dee8746e3f7dd69494460cd6 /src/libs/engine
parent19a9eb15d1c918b10fe169db1b8f4fd0c6ffe8fa (diff)
downloadingen-a421a44310ee472fbee15f150d32b826a8371dbf.tar.gz
ingen-a421a44310ee472fbee15f150d32b826a8371dbf.tar.bz2
ingen-a421a44310ee472fbee15f150d32b826a8371dbf.zip
Fix serialization/connection bugs resulting from refactoring.
git-svn-id: http://svn.drobilla.net/lad/ingen@842 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/libs/engine')
-rw-r--r--src/libs/engine/BufferFactory.cpp2
-rw-r--r--src/libs/engine/Connection.cpp4
-rw-r--r--src/libs/engine/JackAudioDriver.cpp2
-rw-r--r--src/libs/engine/JackMidiDriver.cpp2
4 files changed, 6 insertions, 4 deletions
diff --git a/src/libs/engine/BufferFactory.cpp b/src/libs/engine/BufferFactory.cpp
index 84ff721b..25b09a56 100644
--- a/src/libs/engine/BufferFactory.cpp
+++ b/src/libs/engine/BufferFactory.cpp
@@ -34,7 +34,7 @@ create(DataType type, size_t size)
else if (type.is_osc())
return new OSCBuffer(size);
else
- return NULL;
+ throw;
}
diff --git a/src/libs/engine/Connection.cpp b/src/libs/engine/Connection.cpp
index 0d54fe9f..894a9db7 100644
--- a/src/libs/engine/Connection.cpp
+++ b/src/libs/engine/Connection.cpp
@@ -123,10 +123,12 @@ Connection::process(ProcessContext& context)
* would avoid having to mix multiple times. Probably not a very common
* case, but it would be faster anyway. */
- if (_must_mix && type() == DataType::CONTROL || type() == DataType::AUDIO) {
+ if (_must_mix && (type() == DataType::CONTROL || type() == DataType::AUDIO)) {
const AudioBuffer* const src_buffer = (AudioBuffer*)src_port()->buffer(0);
AudioBuffer* mix_buf = (AudioBuffer*)_local_buffer;
+
+ assert(mix_buf);
const size_t copy_size = std::min(src_buffer->size(), mix_buf->size());
diff --git a/src/libs/engine/JackAudioDriver.cpp b/src/libs/engine/JackAudioDriver.cpp
index d1cde5ca..ce35ce9c 100644
--- a/src/libs/engine/JackAudioDriver.cpp
+++ b/src/libs/engine/JackAudioDriver.cpp
@@ -226,7 +226,7 @@ JackAudioDriver::remove_port(const Path& path)
if ((*i)->patch_port()->path() == path)
return _ports.erase(i)->elem(); // FIXME: LEAK
- cerr << "[JackAudioDriver::remove_port] WARNING: Failed to find Jack port to remove!" << endl;
+ cerr << "[JackAudioDriver::remove_port] WARNING: Unable to find Jack port " << path << endl;
return NULL;
}
diff --git a/src/libs/engine/JackMidiDriver.cpp b/src/libs/engine/JackMidiDriver.cpp
index b07a4e37..448a84e6 100644
--- a/src/libs/engine/JackMidiDriver.cpp
+++ b/src/libs/engine/JackMidiDriver.cpp
@@ -235,7 +235,7 @@ JackMidiDriver::remove_port(const Path& path)
if ((*i)->patch_port()->path() == path)
return _out_ports.erase(i)->elem(); // FIXME: LEAK
- cerr << "[JackMidiDriver::remove_input] WARNING: Failed to find Jack port to remove!" << endl;
+ cerr << "[JackMidiDriver::remove_input] WARNING: Unable to find Jack port " << path << endl;
return NULL;
}