diff options
Diffstat (limited to 'src')
27 files changed, 77 insertions, 77 deletions
diff --git a/src/libs/engine/AlsaMidiDriver.cpp b/src/libs/engine/AlsaMidiDriver.cpp index 1bbed46b..3d592a45 100644 --- a/src/libs/engine/AlsaMidiDriver.cpp +++ b/src/libs/engine/AlsaMidiDriver.cpp @@ -25,7 +25,7 @@ #include "Maid.h" #include "AudioDriver.h" #include "MidiMessage.h" -#include "PortBase.h" +#include "TypedPort.h" #ifdef HAVE_LASH #include "LashDriver.h" #endif @@ -36,7 +36,7 @@ namespace Om { //// AlsaMidiPort //// -AlsaMidiPort::AlsaMidiPort(AlsaMidiDriver* driver, PortBase<MidiMessage>* port) +AlsaMidiPort::AlsaMidiPort(AlsaMidiDriver* driver, TypedPort<MidiMessage>* port) : DriverPort(), ListNode<AlsaMidiPort*>(this), m_driver(driver), diff --git a/src/libs/engine/AlsaMidiDriver.h b/src/libs/engine/AlsaMidiDriver.h index 5acbbfbf..504794ca 100644 --- a/src/libs/engine/AlsaMidiDriver.h +++ b/src/libs/engine/AlsaMidiDriver.h @@ -27,7 +27,7 @@ namespace Om { class Node; class SetPortValueEvent; class AlsaMidiDriver; -template <typename T> class PortBase; +template <typename T> class TypedPort; static const int MAX_MIDI_EVENT_SIZE = 3; @@ -39,7 +39,7 @@ static const int MAX_MIDI_EVENT_SIZE = 3; class AlsaMidiPort : public DriverPort, public ListNode<AlsaMidiPort*> { public: - AlsaMidiPort(AlsaMidiDriver* driver, PortBase<MidiMessage>* port); + AlsaMidiPort(AlsaMidiDriver* driver, TypedPort<MidiMessage>* port); virtual ~AlsaMidiPort(); void event(snd_seq_event_t* const ev); @@ -51,7 +51,7 @@ public: void set_name(const string& name); int port_id() const { return m_port_id; } - PortBase<MidiMessage>* patch_port() const { return m_patch_port; } + TypedPort<MidiMessage>* patch_port() const { return m_patch_port; } private: // Prevent copies (undefined) @@ -59,7 +59,7 @@ private: AlsaMidiPort& operator=(const AlsaMidiPort&); AlsaMidiDriver* m_driver; - PortBase<MidiMessage>* m_patch_port; + TypedPort<MidiMessage>* m_patch_port; int m_port_id; unsigned char** m_midi_pool; ///< Pool of raw MIDI events for MidiMessage::buffer Queue<snd_seq_event_t> m_events; @@ -86,7 +86,7 @@ public: void prepare_block(const samplecount block_start, const samplecount block_end); - DriverPort* create_port(PortBase<MidiMessage>* patch_port) + DriverPort* create_port(TypedPort<MidiMessage>* patch_port) { return new AlsaMidiPort(this, patch_port); } snd_seq_t* seq_handle() const { return m_seq_handle; } diff --git a/src/libs/engine/AudioDriver.h b/src/libs/engine/AudioDriver.h index 5ee4d9c6..07fcf744 100644 --- a/src/libs/engine/AudioDriver.h +++ b/src/libs/engine/AudioDriver.h @@ -25,7 +25,7 @@ namespace Om { class Patch; class AudioDriver; -template <typename T> class PortBase; +template <typename T> class TypedPort; /** Audio driver abstract base class. diff --git a/src/libs/engine/ClientBroadcaster.cpp b/src/libs/engine/ClientBroadcaster.cpp index 8cff03c6..55896536 100644 --- a/src/libs/engine/ClientBroadcaster.cpp +++ b/src/libs/engine/ClientBroadcaster.cpp @@ -26,7 +26,7 @@ #include "Patch.h" #include "Node.h" #include "Plugin.h" -#include "PortBase.h" +#include "TypedPort.h" #include "Connection.h" #include "AudioDriver.h" #include "ObjectSender.h" diff --git a/src/libs/engine/ConnectionBase.h b/src/libs/engine/ConnectionBase.h index 7814ef07..80d7bd84 100644 --- a/src/libs/engine/ConnectionBase.h +++ b/src/libs/engine/ConnectionBase.h @@ -71,7 +71,7 @@ template <> inline Buffer<sample>* ConnectionBase<sample>::buffer(size_t voice) const { - PortBase<sample>* const src_port = (PortBase<sample>*)m_src_port; + TypedPort<sample>* const src_port = (TypedPort<sample>*)m_src_port; if (m_is_poly_to_mono) { return m_local_buffer; @@ -92,7 +92,7 @@ ConnectionBase<MidiMessage>::buffer(size_t voice) const assert(m_src_port->poly() == 1); assert(m_dst_port->poly() == 1); - PortBase<MidiMessage>* const src_port = (PortBase<MidiMessage>*)m_src_port; + TypedPort<MidiMessage>* const src_port = (TypedPort<MidiMessage>*)m_src_port; return src_port->buffer(0); } diff --git a/src/libs/engine/DSSINode.cpp b/src/libs/engine/DSSINode.cpp index 2eb72361..f6cfb6f8 100644 --- a/src/libs/engine/DSSINode.cpp +++ b/src/libs/engine/DSSINode.cpp @@ -108,7 +108,7 @@ void DSSINode::set_control(size_t port_num, sample val) { assert(port_num < _descriptor->PortCount); - ((PortBase<sample>*)_ports->at(port_num))->set_value(val, 0); + ((TypedPort<sample>*)_ports->at(port_num))->set_value(val, 0); } @@ -242,7 +242,7 @@ DSSINode::send_update() // send "control"s for (size_t i=0; i < _ports->size(); ++i) if (_ports->at(i)->type() == DataType::FLOAT && _ports->at(i)->buffer_size() == 1) - send_control(_ports->at(i)->num(), ((PortBase<sample>*)_ports->at(i))->buffer(0)->value_at(0)); + send_control(_ports->at(i)->num(), ((TypedPort<sample>*)_ports->at(i))->buffer(0)->value_at(0)); // send "show" FIXME: not to spec send_show(); diff --git a/src/libs/engine/Driver.h b/src/libs/engine/Driver.h index be882d8d..ade50a71 100644 --- a/src/libs/engine/Driver.h +++ b/src/libs/engine/Driver.h @@ -22,7 +22,7 @@ using std::string; namespace Om { -template <typename T> class PortBase; +template <typename T> class TypedPort; /** Representation of a system (outside Om, ie hardware) audio port. @@ -77,7 +77,7 @@ public: * * May return NULL if the Driver can not drive the port for some reason. */ - virtual DriverPort* create_port(PortBase<T>* patch_port) = 0; + virtual DriverPort* create_port(TypedPort<T>* patch_port) = 0; }; @@ -102,7 +102,7 @@ public: void enable() {} void disable() {} - DriverPort* create_port(PortBase<sample>* patch_port) { return NULL; } + DriverPort* create_port(TypedPort<sample>* patch_port) { return NULL; } }; #endif diff --git a/src/libs/engine/InputPort.cpp b/src/libs/engine/InputPort.cpp index 4392277a..0e7a349d 100644 --- a/src/libs/engine/InputPort.cpp +++ b/src/libs/engine/InputPort.cpp @@ -32,7 +32,7 @@ namespace Om { template <typename T> InputPort<T>::InputPort(Node* parent, const string& name, size_t index, size_t poly, DataType type, size_t buffer_size) -: PortBase<T>(parent, name, index, poly, type, buffer_size) +: TypedPort<T>(parent, name, index, poly, type, buffer_size) { } template InputPort<sample>::InputPort(Node* parent, const string& name, size_t index, size_t poly, DataType type, size_t buffer_size); diff --git a/src/libs/engine/InputPort.h b/src/libs/engine/InputPort.h index 79f03329..8c677b26 100644 --- a/src/libs/engine/InputPort.h +++ b/src/libs/engine/InputPort.h @@ -20,7 +20,7 @@ #include <string> #include <cstdlib> #include <cassert> -#include "PortBase.h" +#include "TypedPort.h" #include "List.h" #include "MidiMessage.h" using std::string; @@ -44,7 +44,7 @@ class Node; * \ingroup engine */ template <typename T> -class InputPort : public PortBase<T> +class InputPort : public TypedPort<T> { public: InputPort(Node* parent, const string& name, size_t index, size_t poly, DataType type, size_t buffer_size); @@ -75,13 +75,13 @@ private: List<ConnectionBase<T>*> m_connections; // This is just stupid... - using PortBase<T>::m_is_tied; - using PortBase<T>::m_tied_port; - using PortBase<T>::m_buffers; - using PortBase<T>::_poly; - using PortBase<T>::_index; - using PortBase<T>::_buffer_size; - using PortBase<T>::m_fixed_buffers; + using TypedPort<T>::m_is_tied; + using TypedPort<T>::m_tied_port; + using TypedPort<T>::m_buffers; + using TypedPort<T>::_poly; + using TypedPort<T>::_index; + using TypedPort<T>::_buffer_size; + using TypedPort<T>::m_fixed_buffers; }; diff --git a/src/libs/engine/JackAudioDriver.cpp b/src/libs/engine/JackAudioDriver.cpp index 5f871ef7..e6ef502e 100644 --- a/src/libs/engine/JackAudioDriver.cpp +++ b/src/libs/engine/JackAudioDriver.cpp @@ -32,7 +32,7 @@ #include "Port.h" #include "MidiDriver.h" #include "List.h" -#include "PortBase.h" +#include "TypedPort.h" #ifdef HAVE_LASH #include "LashDriver.h" #endif @@ -45,7 +45,7 @@ namespace Om { //// JackAudioPort //// -JackAudioPort::JackAudioPort(JackAudioDriver* driver, PortBase<sample>* patch_port) +JackAudioPort::JackAudioPort(JackAudioDriver* driver, TypedPort<sample>* patch_port) : DriverPort(), ListNode<JackAudioPort*>(this), m_driver(driver), @@ -241,7 +241,7 @@ JackAudioDriver::remove_port(JackAudioPort* port) DriverPort* -JackAudioDriver::create_port(PortBase<sample>* patch_port) +JackAudioDriver::create_port(TypedPort<sample>* patch_port) { if (patch_port->buffer_size() == m_buffer_size) return new JackAudioPort(this, patch_port); diff --git a/src/libs/engine/JackAudioDriver.h b/src/libs/engine/JackAudioDriver.h index c55d392f..a01624ed 100644 --- a/src/libs/engine/JackAudioDriver.h +++ b/src/libs/engine/JackAudioDriver.h @@ -27,7 +27,7 @@ namespace Om { class Patch; class Port; -template <typename T> class PortBase; +template <typename T> class TypedPort; class JackAudioDriver; typedef jack_default_audio_sample_t jack_sample_t; @@ -39,7 +39,7 @@ typedef jack_default_audio_sample_t jack_sample_t; class JackAudioPort : public DriverPort, public ListNode<JackAudioPort*> { public: - JackAudioPort(JackAudioDriver* driver, PortBase<sample>* patch_port); + JackAudioPort(JackAudioDriver* driver, TypedPort<sample>* patch_port); ~JackAudioPort(); void add_to_driver(); @@ -51,7 +51,7 @@ public: jack_port_t* jack_port() const { return m_jack_port; } DriverBuffer<sample>* buffer() const { return m_jack_buffer; } void jack_buffer(jack_sample_t* s) { m_jack_buffer->set_data(s); } - PortBase<sample>* patch_port() const { return m_patch_port; } + TypedPort<sample>* patch_port() const { return m_patch_port; } private: // Prevent copies (undefined) @@ -61,7 +61,7 @@ private: JackAudioDriver* m_driver; jack_port_t* m_jack_port; DriverBuffer<sample>* m_jack_buffer; - PortBase<sample>* m_patch_port; + TypedPort<sample>* m_patch_port; }; @@ -88,7 +88,7 @@ public: void process_events(jack_nframes_t block_start, jack_nframes_t block_end); - DriverPort* create_port(PortBase<sample>* patch_port); + DriverPort* create_port(TypedPort<sample>* patch_port); Patch* root_patch() { return m_root_patch; } void set_root_patch(Patch* patch) { m_root_patch = patch; } diff --git a/src/libs/engine/JackMidiDriver.cpp b/src/libs/engine/JackMidiDriver.cpp index 64850a1c..f55f0422 100644 --- a/src/libs/engine/JackMidiDriver.cpp +++ b/src/libs/engine/JackMidiDriver.cpp @@ -26,7 +26,7 @@ #include "Maid.h" #include "AudioDriver.h" #include "MidiMessage.h" -#include "PortBase.h" +#include "TypedPort.h" #ifdef HAVE_LASH #include "LashDriver.h" #endif @@ -37,7 +37,7 @@ namespace Om { //// JackMidiPort //// -JackMidiPort::JackMidiPort(JackMidiDriver* driver, PortBase<MidiMessage>* patch_port) +JackMidiPort::JackMidiPort(JackMidiDriver* driver, TypedPort<MidiMessage>* patch_port) : DriverPort(), ListNode<JackMidiPort*>(this), m_driver(driver), diff --git a/src/libs/engine/JackMidiDriver.h b/src/libs/engine/JackMidiDriver.h index 950d382f..33b4a0e1 100644 --- a/src/libs/engine/JackMidiDriver.h +++ b/src/libs/engine/JackMidiDriver.h @@ -29,7 +29,7 @@ namespace Om { class Node; class SetPortValueEvent; class JackMidiDriver; -template <typename T> class PortBase; +template <typename T> class TypedPort; /** Representation of an JACK MIDI port. @@ -39,7 +39,7 @@ template <typename T> class PortBase; class JackMidiPort : public DriverPort, public ListNode<JackMidiPort*> { public: - JackMidiPort(JackMidiDriver* driver, PortBase<MidiMessage>* port); + JackMidiPort(JackMidiDriver* driver, TypedPort<MidiMessage>* port); virtual ~JackMidiPort(); void prepare_block(const samplecount block_start, const samplecount block_end); @@ -48,7 +48,7 @@ public: void remove_from_driver(); void set_name(const string& name) { jack_port_set_name(m_jack_port, name.c_str()); }; - PortBase<MidiMessage>* patch_port() const { return m_patch_port; } + TypedPort<MidiMessage>* patch_port() const { return m_patch_port; } private: // Prevent copies (undefined) @@ -57,7 +57,7 @@ private: JackMidiDriver* m_driver; jack_port_t* m_jack_port; - PortBase<MidiMessage>* m_patch_port; + TypedPort<MidiMessage>* m_patch_port; }; @@ -84,7 +84,7 @@ public: void prepare_block(const samplecount block_start, const samplecount block_end); - JackMidiPort* create_port(PortBase<MidiMessage>* patch_port) + JackMidiPort* create_port(TypedPort<MidiMessage>* patch_port) { return new JackMidiPort(this, patch_port); } jack_client_t* jack_client() { return m_client; } diff --git a/src/libs/engine/LADSPANode.cpp b/src/libs/engine/LADSPANode.cpp index 0ca0aca7..5dcef91e 100644 --- a/src/libs/engine/LADSPANode.cpp +++ b/src/libs/engine/LADSPANode.cpp @@ -119,9 +119,9 @@ LADSPANode::instantiate() // Set default control val if (port->buffer_size() == 1) - ((PortBase<sample>*)port)->set_value(default_val, 0); + ((TypedPort<sample>*)port)->set_value(default_val, 0); else - ((PortBase<sample>*)port)->set_value(0.0f, 0); + ((TypedPort<sample>*)port)->set_value(0.0f, 0); } return true; @@ -142,12 +142,12 @@ LADSPANode::activate() { NodeBase::activate(); - PortBase<sample>* port = NULL; + TypedPort<sample>* port = NULL; for (size_t i=0; i < _poly; ++i) { for (unsigned long j=0; j < _descriptor->PortCount; ++j) { - port = static_cast<PortBase<sample>*>(_ports->at(j)); - set_port_buffer(i, j, ((PortBase<sample>*)_ports->at(j))->buffer(i)->data()); + port = static_cast<TypedPort<sample>*>(_ports->at(j)); + set_port_buffer(i, j, ((TypedPort<sample>*)_ports->at(j))->buffer(i)->data()); if (port->type() == DataType::FLOAT && port->buffer_size() == 1) port->set_value(0.0f, 0); // FIXME else if (port->type() == DataType::FLOAT && port->buffer_size() > 1) diff --git a/src/libs/engine/LV2Node.cpp b/src/libs/engine/LV2Node.cpp index 34bbe61e..5a037c70 100644 --- a/src/libs/engine/LV2Node.cpp +++ b/src/libs/engine/LV2Node.cpp @@ -114,9 +114,9 @@ LV2Node::instantiate() // Set default control val /*if (pi->is_control()) - ((PortBase<sample>*)port)->set_value(pi->default_val(), 0); + ((TypedPort<sample>*)port)->set_value(pi->default_val(), 0); else - ((PortBase<sample>*)port)->set_value(0.0f, 0);*/ + ((TypedPort<sample>*)port)->set_value(0.0f, 0);*/ } return true; } @@ -136,12 +136,12 @@ LV2Node::activate() { NodeBase::activate(); - PortBase<sample>* port = NULL; + TypedPort<sample>* port = NULL; for (size_t i=0; i < _poly; ++i) { for (unsigned long j=0; j < num_ports(); ++j) { - port = static_cast<PortBase<sample>*>(_ports->at(j)); - set_port_buffer(i, j, ((PortBase<sample>*)_ports->at(j))->buffer(i)->data()); + port = static_cast<TypedPort<sample>*>(_ports->at(j)); + set_port_buffer(i, j, ((TypedPort<sample>*)_ports->at(j))->buffer(i)->data()); if (port->type() == DataType::FLOAT && port->buffer_size() == 1) port->set_value(0.0f, 0); // FIXME else if (port->type() == DataType::FLOAT && port->buffer_size() > 1) diff --git a/src/libs/engine/Makefile.am b/src/libs/engine/Makefile.am index e0c43e3e..09098e10 100644 --- a/src/libs/engine/Makefile.am +++ b/src/libs/engine/Makefile.am @@ -41,8 +41,8 @@ libom_la_SOURCES = \ Buffer.cpp \ Port.h \ Port.cpp \ - PortBase.h \ - PortBase.cpp \ + TypedPort.h \ + TypedPort.cpp \ InputPort.h \ InputPort.cpp \ OutputPort.h \ diff --git a/src/libs/engine/MidiDriver.h b/src/libs/engine/MidiDriver.h index b8fd71ca..ed9d6e18 100644 --- a/src/libs/engine/MidiDriver.h +++ b/src/libs/engine/MidiDriver.h @@ -66,7 +66,7 @@ public: void enable() {} void disable() {} - DriverPort* create_port(PortBase<MidiMessage>* patch_port) { return NULL; } + DriverPort* create_port(TypedPort<MidiMessage>* patch_port) { return NULL; } void prepare_block(const samplecount block_start, const samplecount block_end) {} }; diff --git a/src/libs/engine/OSCClient.cpp b/src/libs/engine/OSCClient.cpp index e0bc5808..ff7c379f 100644 --- a/src/libs/engine/OSCClient.cpp +++ b/src/libs/engine/OSCClient.cpp @@ -26,7 +26,7 @@ #include "Patch.h" #include "Node.h" #include "Plugin.h" -#include "PortBase.h" +#include "TypedPort.h" #include "Connection.h" #include "AudioDriver.h" #include "interface/ClientInterface.h" @@ -278,7 +278,7 @@ void OSCClient::new_node(const string& plugin_type, // Send control values for (size_t i=0; i < node->ports().size(); ++i) { - PortBase<sample>* port = (PortBase<sample>*)node->ports().at(i); + TypedPort<sample>* port = (TypedPort<sample>*)node->ports().at(i); if (port->port_info()->is_input() && port->port_info()->is_control()) control_change(port->path(), port->buffer(0)->value_at(0)); } diff --git a/src/libs/engine/ObjectSender.cpp b/src/libs/engine/ObjectSender.cpp index 3bd725e0..567beabe 100644 --- a/src/libs/engine/ObjectSender.cpp +++ b/src/libs/engine/ObjectSender.cpp @@ -22,7 +22,7 @@ #include "Patch.h" #include "Node.h" #include "Port.h" -#include "PortBase.h" +#include "TypedPort.h" #include "Connection.h" #include "NodeFactory.h" @@ -72,7 +72,7 @@ ObjectSender::send_patch(ClientInterface* client, const Patch* patch) // Control port, send value if (port->type() == DataType::FLOAT && port->buffer_size() == 1) - client->control_change(port->path(), ((PortBase<sample>*)port)->buffer(0)->value_at(0)); + client->control_change(port->path(), ((TypedPort<sample>*)port)->buffer(0)->value_at(0)); } // Send metadata diff --git a/src/libs/engine/OutputPort.cpp b/src/libs/engine/OutputPort.cpp index 6ebdf966..35cb84b4 100644 --- a/src/libs/engine/OutputPort.cpp +++ b/src/libs/engine/OutputPort.cpp @@ -22,7 +22,7 @@ namespace Om { template<typename T> OutputPort<T>::OutputPort(Node* parent, const string& name, size_t index, size_t poly, DataType type, size_t buffer_size) -: PortBase<T>(parent, name, index, poly, type, buffer_size) +: TypedPort<T>(parent, name, index, poly, type, buffer_size) { } template OutputPort<sample>::OutputPort(Node* parent, const string& name, size_t index, size_t poly, DataType type, size_t buffer_size); @@ -35,11 +35,11 @@ OutputPort<T>::set_tied_port(InputPort<T>* port) { assert(!m_is_tied); assert(m_tied_port == NULL); - assert(static_cast<PortBase<T>*>(port) != static_cast<PortBase<T>*>(this)); + assert(static_cast<TypedPort<T>*>(port) != static_cast<TypedPort<T>*>(this)); assert(port != NULL); m_is_tied = true; - m_tied_port = (PortBase<T>*)port; + m_tied_port = (TypedPort<T>*)port; } template void OutputPort<sample>::set_tied_port(InputPort<sample>* port); template void OutputPort<MidiMessage>::set_tied_port(InputPort<MidiMessage>* port); diff --git a/src/libs/engine/OutputPort.h b/src/libs/engine/OutputPort.h index 4c9b3da4..269a4524 100644 --- a/src/libs/engine/OutputPort.h +++ b/src/libs/engine/OutputPort.h @@ -19,7 +19,7 @@ #include <string> #include <cstdlib> -#include "PortBase.h" +#include "TypedPort.h" #include "types.h" namespace Om { @@ -39,7 +39,7 @@ template <typename T> class InputPort; * \ingroup engine */ template <typename T> -class OutputPort : public PortBase<T> +class OutputPort : public TypedPort<T> { public: OutputPort(Node* parent, const string& name, size_t index, size_t poly, DataType type, size_t buffer_size); @@ -55,8 +55,8 @@ private: OutputPort(const OutputPort& copy); OutputPort<T>& operator=(const OutputPort<T>&); - using PortBase<T>::m_is_tied; - using PortBase<T>::m_tied_port; + using TypedPort<T>::m_is_tied; + using TypedPort<T>::m_tied_port; }; diff --git a/src/libs/engine/Patch.cpp b/src/libs/engine/Patch.cpp index 1e9aa566..b24377e0 100644 --- a/src/libs/engine/Patch.cpp +++ b/src/libs/engine/Patch.cpp @@ -26,7 +26,7 @@ #include "Connection.h" #include "Om.h" #include "OmApp.h" -#include "PortBase.h" +#include "TypedPort.h" #include "ObjectStore.h" #include "InputPort.h" #include "OutputPort.h" @@ -169,7 +169,7 @@ Patch::send_creation_messages(ClientInterface* client) const // If this is a bridge (input/output) node, send the patch control value as well if (port != NULL && port->port_info()->is_control()) om->client_broadcaster()->send_control_change_to(client, port->path(), - ((PortBase<sample>*)port)->buffer(0)->value_at(0)); + ((TypedPort<sample>*)port)->buffer(0)->value_at(0)); } for (List<Connection*>::const_iterator j = _connections.begin(); j != _connections.end(); ++j) { @@ -187,7 +187,7 @@ Patch::send_creation_messages(ClientInterface* client) const if (port->port_info()->is_control()) om->client_broadcaster()->send_control_change_to(client, port->path(), - ((PortBase<sample>*)port)->buffer(0)->value_at(0)); + ((TypedPort<sample>*)port)->buffer(0)->value_at(0)); }*/ } #endif diff --git a/src/libs/engine/PortBase.cpp b/src/libs/engine/TypedPort.cpp index 0ebb05eb..0ebb05eb 100644 --- a/src/libs/engine/PortBase.cpp +++ b/src/libs/engine/TypedPort.cpp diff --git a/src/libs/engine/PortBase.h b/src/libs/engine/TypedPort.h index e2ccaff4..e2ccaff4 100644 --- a/src/libs/engine/PortBase.h +++ b/src/libs/engine/TypedPort.h diff --git a/src/libs/engine/events/RequestPortValueEvent.cpp b/src/libs/engine/events/RequestPortValueEvent.cpp index cd578460..e9766c9b 100644 --- a/src/libs/engine/events/RequestPortValueEvent.cpp +++ b/src/libs/engine/events/RequestPortValueEvent.cpp @@ -20,7 +20,7 @@ #include "Om.h" #include "OmApp.h" #include "interface/ClientInterface.h" -#include "PortBase.h" +#include "TypedPort.h" #include "ObjectStore.h" #include "ClientBroadcaster.h" @@ -53,7 +53,7 @@ void RequestPortValueEvent::execute(samplecount offset) { if (m_port != NULL && m_port->type() == DataType::FLOAT) - m_value = ((PortBase<sample>*)m_port)->buffer(0)->value_at(offset); + m_value = ((TypedPort<sample>*)m_port)->buffer(0)->value_at(offset); else m_port = NULL; // triggers error response diff --git a/src/libs/engine/events/SetPortValueEvent.cpp b/src/libs/engine/events/SetPortValueEvent.cpp index 046e935f..73672248 100644 --- a/src/libs/engine/events/SetPortValueEvent.cpp +++ b/src/libs/engine/events/SetPortValueEvent.cpp @@ -18,7 +18,7 @@ #include "Responder.h" #include "Om.h" #include "OmApp.h" -#include "PortBase.h" +#include "TypedPort.h" #include "ClientBroadcaster.h" #include "Node.h" #include "ObjectStore.h" @@ -62,10 +62,10 @@ SetPortValueEvent::execute(samplecount offset) m_error = TYPE_MISMATCH; } else { if (m_voice_num == -1) - ((PortBase<sample>*)m_port)->set_value(m_val, offset); + ((TypedPort<sample>*)m_port)->set_value(m_val, offset); else - ((PortBase<sample>*)m_port)->set_value(m_voice_num, m_val, offset); - //((PortBase<sample>*)m_port)->buffer(m_voice_num)->set(m_val, offset); // FIXME: check range + ((TypedPort<sample>*)m_port)->set_value(m_voice_num, m_val, offset); + //((TypedPort<sample>*)m_port)->buffer(m_voice_num)->set(m_val, offset); // FIXME: check range } } diff --git a/src/libs/engine/events/SetPortValueQueuedEvent.cpp b/src/libs/engine/events/SetPortValueQueuedEvent.cpp index c7750064..3e93b01b 100644 --- a/src/libs/engine/events/SetPortValueQueuedEvent.cpp +++ b/src/libs/engine/events/SetPortValueQueuedEvent.cpp @@ -18,7 +18,7 @@ #include "Responder.h" #include "Om.h" #include "OmApp.h" -#include "PortBase.h" +#include "TypedPort.h" #include "ClientBroadcaster.h" #include "Plugin.h" #include "Node.h" @@ -75,9 +75,9 @@ SetPortValueQueuedEvent::execute(samplecount offset) if (m_error == NO_ERROR) { assert(m_port != NULL); if (m_voice_num == -1) - ((PortBase<sample>*)m_port)->set_value(m_val, offset); + ((TypedPort<sample>*)m_port)->set_value(m_val, offset); else - ((PortBase<sample>*)m_port)->buffer(m_voice_num)->set(m_val, offset); // FIXME: check range + ((TypedPort<sample>*)m_port)->buffer(m_voice_num)->set(m_val, offset); // FIXME: check range } } |