diff --git a/grauph/src/libs/engine/AlsaMidiDriver.cpp b/grauph/src/libs/engine/AlsaMidiDriver.cpp index 1bbed46b..3d592a45 100644 --- a/grauph/src/libs/engine/AlsaMidiDriver.cpp +++ b/grauph/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* port) +AlsaMidiPort::AlsaMidiPort(AlsaMidiDriver* driver, TypedPort* port) : DriverPort(), ListNode(this), m_driver(driver), diff --git a/grauph/src/libs/engine/AlsaMidiDriver.h b/grauph/src/libs/engine/AlsaMidiDriver.h index 5acbbfbf..504794ca 100644 --- a/grauph/src/libs/engine/AlsaMidiDriver.h +++ b/grauph/src/libs/engine/AlsaMidiDriver.h @@ -27,7 +27,7 @@ namespace Om { class Node; class SetPortValueEvent; class AlsaMidiDriver; -template class PortBase; +template 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 { public: - AlsaMidiPort(AlsaMidiDriver* driver, PortBase* port); + AlsaMidiPort(AlsaMidiDriver* driver, TypedPort* 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* patch_port() const { return m_patch_port; } + TypedPort* patch_port() const { return m_patch_port; } private: // Prevent copies (undefined) @@ -59,7 +59,7 @@ private: AlsaMidiPort& operator=(const AlsaMidiPort&); AlsaMidiDriver* m_driver; - PortBase* m_patch_port; + TypedPort* m_patch_port; int m_port_id; unsigned char** m_midi_pool; ///< Pool of raw MIDI events for MidiMessage::buffer Queue m_events; @@ -86,7 +86,7 @@ public: void prepare_block(const samplecount block_start, const samplecount block_end); - DriverPort* create_port(PortBase* patch_port) + DriverPort* create_port(TypedPort* patch_port) { return new AlsaMidiPort(this, patch_port); } snd_seq_t* seq_handle() const { return m_seq_handle; } diff --git a/grauph/src/libs/engine/AudioDriver.h b/grauph/src/libs/engine/AudioDriver.h index 5ee4d9c6..07fcf744 100644 --- a/grauph/src/libs/engine/AudioDriver.h +++ b/grauph/src/libs/engine/AudioDriver.h @@ -25,7 +25,7 @@ namespace Om { class Patch; class AudioDriver; -template class PortBase; +template class TypedPort; /** Audio driver abstract base class. diff --git a/grauph/src/libs/engine/ClientBroadcaster.cpp b/grauph/src/libs/engine/ClientBroadcaster.cpp index 8cff03c6..55896536 100644 --- a/grauph/src/libs/engine/ClientBroadcaster.cpp +++ b/grauph/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/grauph/src/libs/engine/ConnectionBase.h b/grauph/src/libs/engine/ConnectionBase.h index 7814ef07..80d7bd84 100644 --- a/grauph/src/libs/engine/ConnectionBase.h +++ b/grauph/src/libs/engine/ConnectionBase.h @@ -71,7 +71,7 @@ template <> inline Buffer* ConnectionBase::buffer(size_t voice) const { - PortBase* const src_port = (PortBase*)m_src_port; + TypedPort* const src_port = (TypedPort*)m_src_port; if (m_is_poly_to_mono) { return m_local_buffer; @@ -92,7 +92,7 @@ ConnectionBase::buffer(size_t voice) const assert(m_src_port->poly() == 1); assert(m_dst_port->poly() == 1); - PortBase* const src_port = (PortBase*)m_src_port; + TypedPort* const src_port = (TypedPort*)m_src_port; return src_port->buffer(0); } diff --git a/grauph/src/libs/engine/DSSINode.cpp b/grauph/src/libs/engine/DSSINode.cpp index 2eb72361..f6cfb6f8 100644 --- a/grauph/src/libs/engine/DSSINode.cpp +++ b/grauph/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*)_ports->at(port_num))->set_value(val, 0); + ((TypedPort*)_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*)_ports->at(i))->buffer(0)->value_at(0)); + send_control(_ports->at(i)->num(), ((TypedPort*)_ports->at(i))->buffer(0)->value_at(0)); // send "show" FIXME: not to spec send_show(); diff --git a/grauph/src/libs/engine/Driver.h b/grauph/src/libs/engine/Driver.h index be882d8d..ade50a71 100644 --- a/grauph/src/libs/engine/Driver.h +++ b/grauph/src/libs/engine/Driver.h @@ -22,7 +22,7 @@ using std::string; namespace Om { -template class PortBase; +template 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* patch_port) = 0; + virtual DriverPort* create_port(TypedPort* patch_port) = 0; }; @@ -102,7 +102,7 @@ public: void enable() {} void disable() {} - DriverPort* create_port(PortBase* patch_port) { return NULL; } + DriverPort* create_port(TypedPort* patch_port) { return NULL; } }; #endif diff --git a/grauph/src/libs/engine/InputPort.cpp b/grauph/src/libs/engine/InputPort.cpp index 4392277a..0e7a349d 100644 --- a/grauph/src/libs/engine/InputPort.cpp +++ b/grauph/src/libs/engine/InputPort.cpp @@ -32,7 +32,7 @@ namespace Om { template InputPort::InputPort(Node* parent, const string& name, size_t index, size_t poly, DataType type, size_t buffer_size) -: PortBase(parent, name, index, poly, type, buffer_size) +: TypedPort(parent, name, index, poly, type, buffer_size) { } template InputPort::InputPort(Node* parent, const string& name, size_t index, size_t poly, DataType type, size_t buffer_size); diff --git a/grauph/src/libs/engine/InputPort.h b/grauph/src/libs/engine/InputPort.h index 79f03329..8c677b26 100644 --- a/grauph/src/libs/engine/InputPort.h +++ b/grauph/src/libs/engine/InputPort.h @@ -20,7 +20,7 @@ #include #include #include -#include "PortBase.h" +#include "TypedPort.h" #include "List.h" #include "MidiMessage.h" using std::string; @@ -44,7 +44,7 @@ class Node; * \ingroup engine */ template -class InputPort : public PortBase +class InputPort : public TypedPort { 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*> m_connections; // This is just stupid... - using PortBase::m_is_tied; - using PortBase::m_tied_port; - using PortBase::m_buffers; - using PortBase::_poly; - using PortBase::_index; - using PortBase::_buffer_size; - using PortBase::m_fixed_buffers; + using TypedPort::m_is_tied; + using TypedPort::m_tied_port; + using TypedPort::m_buffers; + using TypedPort::_poly; + using TypedPort::_index; + using TypedPort::_buffer_size; + using TypedPort::m_fixed_buffers; }; diff --git a/grauph/src/libs/engine/JackAudioDriver.cpp b/grauph/src/libs/engine/JackAudioDriver.cpp index 5f871ef7..e6ef502e 100644 --- a/grauph/src/libs/engine/JackAudioDriver.cpp +++ b/grauph/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* patch_port) +JackAudioPort::JackAudioPort(JackAudioDriver* driver, TypedPort* patch_port) : DriverPort(), ListNode(this), m_driver(driver), @@ -241,7 +241,7 @@ JackAudioDriver::remove_port(JackAudioPort* port) DriverPort* -JackAudioDriver::create_port(PortBase* patch_port) +JackAudioDriver::create_port(TypedPort* patch_port) { if (patch_port->buffer_size() == m_buffer_size) return new JackAudioPort(this, patch_port); diff --git a/grauph/src/libs/engine/JackAudioDriver.h b/grauph/src/libs/engine/JackAudioDriver.h index c55d392f..a01624ed 100644 --- a/grauph/src/libs/engine/JackAudioDriver.h +++ b/grauph/src/libs/engine/JackAudioDriver.h @@ -27,7 +27,7 @@ namespace Om { class Patch; class Port; -template class PortBase; +template 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 { public: - JackAudioPort(JackAudioDriver* driver, PortBase* patch_port); + JackAudioPort(JackAudioDriver* driver, TypedPort* patch_port); ~JackAudioPort(); void add_to_driver(); @@ -51,7 +51,7 @@ public: jack_port_t* jack_port() const { return m_jack_port; } DriverBuffer* buffer() const { return m_jack_buffer; } void jack_buffer(jack_sample_t* s) { m_jack_buffer->set_data(s); } - PortBase* patch_port() const { return m_patch_port; } + TypedPort* 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* m_jack_buffer; - PortBase* m_patch_port; + TypedPort* 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* patch_port); + DriverPort* create_port(TypedPort* patch_port); Patch* root_patch() { return m_root_patch; } void set_root_patch(Patch* patch) { m_root_patch = patch; } diff --git a/grauph/src/libs/engine/JackMidiDriver.cpp b/grauph/src/libs/engine/JackMidiDriver.cpp index 64850a1c..f55f0422 100644 --- a/grauph/src/libs/engine/JackMidiDriver.cpp +++ b/grauph/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* patch_port) +JackMidiPort::JackMidiPort(JackMidiDriver* driver, TypedPort* patch_port) : DriverPort(), ListNode(this), m_driver(driver), diff --git a/grauph/src/libs/engine/JackMidiDriver.h b/grauph/src/libs/engine/JackMidiDriver.h index 950d382f..33b4a0e1 100644 --- a/grauph/src/libs/engine/JackMidiDriver.h +++ b/grauph/src/libs/engine/JackMidiDriver.h @@ -29,7 +29,7 @@ namespace Om { class Node; class SetPortValueEvent; class JackMidiDriver; -template class PortBase; +template class TypedPort; /** Representation of an JACK MIDI port. @@ -39,7 +39,7 @@ template class PortBase; class JackMidiPort : public DriverPort, public ListNode { public: - JackMidiPort(JackMidiDriver* driver, PortBase* port); + JackMidiPort(JackMidiDriver* driver, TypedPort* 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* patch_port() const { return m_patch_port; } + TypedPort* 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* m_patch_port; + TypedPort* m_patch_port; }; @@ -84,7 +84,7 @@ public: void prepare_block(const samplecount block_start, const samplecount block_end); - JackMidiPort* create_port(PortBase* patch_port) + JackMidiPort* create_port(TypedPort* patch_port) { return new JackMidiPort(this, patch_port); } jack_client_t* jack_client() { return m_client; } diff --git a/grauph/src/libs/engine/LADSPANode.cpp b/grauph/src/libs/engine/LADSPANode.cpp index 0ca0aca7..5dcef91e 100644 --- a/grauph/src/libs/engine/LADSPANode.cpp +++ b/grauph/src/libs/engine/LADSPANode.cpp @@ -119,9 +119,9 @@ LADSPANode::instantiate() // Set default control val if (port->buffer_size() == 1) - ((PortBase*)port)->set_value(default_val, 0); + ((TypedPort*)port)->set_value(default_val, 0); else - ((PortBase*)port)->set_value(0.0f, 0); + ((TypedPort*)port)->set_value(0.0f, 0); } return true; @@ -142,12 +142,12 @@ LADSPANode::activate() { NodeBase::activate(); - PortBase* port = NULL; + TypedPort* port = NULL; for (size_t i=0; i < _poly; ++i) { for (unsigned long j=0; j < _descriptor->PortCount; ++j) { - port = static_cast*>(_ports->at(j)); - set_port_buffer(i, j, ((PortBase*)_ports->at(j))->buffer(i)->data()); + port = static_cast*>(_ports->at(j)); + set_port_buffer(i, j, ((TypedPort*)_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/grauph/src/libs/engine/LV2Node.cpp b/grauph/src/libs/engine/LV2Node.cpp index 34bbe61e..5a037c70 100644 --- a/grauph/src/libs/engine/LV2Node.cpp +++ b/grauph/src/libs/engine/LV2Node.cpp @@ -114,9 +114,9 @@ LV2Node::instantiate() // Set default control val /*if (pi->is_control()) - ((PortBase*)port)->set_value(pi->default_val(), 0); + ((TypedPort*)port)->set_value(pi->default_val(), 0); else - ((PortBase*)port)->set_value(0.0f, 0);*/ + ((TypedPort*)port)->set_value(0.0f, 0);*/ } return true; } @@ -136,12 +136,12 @@ LV2Node::activate() { NodeBase::activate(); - PortBase* port = NULL; + TypedPort* port = NULL; for (size_t i=0; i < _poly; ++i) { for (unsigned long j=0; j < num_ports(); ++j) { - port = static_cast*>(_ports->at(j)); - set_port_buffer(i, j, ((PortBase*)_ports->at(j))->buffer(i)->data()); + port = static_cast*>(_ports->at(j)); + set_port_buffer(i, j, ((TypedPort*)_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/grauph/src/libs/engine/Makefile.am b/grauph/src/libs/engine/Makefile.am index e0c43e3e..09098e10 100644 --- a/grauph/src/libs/engine/Makefile.am +++ b/grauph/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/grauph/src/libs/engine/MidiDriver.h b/grauph/src/libs/engine/MidiDriver.h index b8fd71ca..ed9d6e18 100644 --- a/grauph/src/libs/engine/MidiDriver.h +++ b/grauph/src/libs/engine/MidiDriver.h @@ -66,7 +66,7 @@ public: void enable() {} void disable() {} - DriverPort* create_port(PortBase* patch_port) { return NULL; } + DriverPort* create_port(TypedPort* patch_port) { return NULL; } void prepare_block(const samplecount block_start, const samplecount block_end) {} }; diff --git a/grauph/src/libs/engine/OSCClient.cpp b/grauph/src/libs/engine/OSCClient.cpp index e0bc5808..ff7c379f 100644 --- a/grauph/src/libs/engine/OSCClient.cpp +++ b/grauph/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* port = (PortBase*)node->ports().at(i); + TypedPort* port = (TypedPort*)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/grauph/src/libs/engine/ObjectSender.cpp b/grauph/src/libs/engine/ObjectSender.cpp index 3bd725e0..567beabe 100644 --- a/grauph/src/libs/engine/ObjectSender.cpp +++ b/grauph/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*)port)->buffer(0)->value_at(0)); + client->control_change(port->path(), ((TypedPort*)port)->buffer(0)->value_at(0)); } // Send metadata diff --git a/grauph/src/libs/engine/OutputPort.cpp b/grauph/src/libs/engine/OutputPort.cpp index 6ebdf966..35cb84b4 100644 --- a/grauph/src/libs/engine/OutputPort.cpp +++ b/grauph/src/libs/engine/OutputPort.cpp @@ -22,7 +22,7 @@ namespace Om { template OutputPort::OutputPort(Node* parent, const string& name, size_t index, size_t poly, DataType type, size_t buffer_size) -: PortBase(parent, name, index, poly, type, buffer_size) +: TypedPort(parent, name, index, poly, type, buffer_size) { } template OutputPort::OutputPort(Node* parent, const string& name, size_t index, size_t poly, DataType type, size_t buffer_size); @@ -35,11 +35,11 @@ OutputPort::set_tied_port(InputPort* port) { assert(!m_is_tied); assert(m_tied_port == NULL); - assert(static_cast*>(port) != static_cast*>(this)); + assert(static_cast*>(port) != static_cast*>(this)); assert(port != NULL); m_is_tied = true; - m_tied_port = (PortBase*)port; + m_tied_port = (TypedPort*)port; } template void OutputPort::set_tied_port(InputPort* port); template void OutputPort::set_tied_port(InputPort* port); diff --git a/grauph/src/libs/engine/OutputPort.h b/grauph/src/libs/engine/OutputPort.h index 4c9b3da4..269a4524 100644 --- a/grauph/src/libs/engine/OutputPort.h +++ b/grauph/src/libs/engine/OutputPort.h @@ -19,7 +19,7 @@ #include #include -#include "PortBase.h" +#include "TypedPort.h" #include "types.h" namespace Om { @@ -39,7 +39,7 @@ template class InputPort; * \ingroup engine */ template -class OutputPort : public PortBase +class OutputPort : public TypedPort { 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& operator=(const OutputPort&); - using PortBase::m_is_tied; - using PortBase::m_tied_port; + using TypedPort::m_is_tied; + using TypedPort::m_tied_port; }; diff --git a/grauph/src/libs/engine/Patch.cpp b/grauph/src/libs/engine/Patch.cpp index 1e9aa566..b24377e0 100644 --- a/grauph/src/libs/engine/Patch.cpp +++ b/grauph/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*)port)->buffer(0)->value_at(0)); + ((TypedPort*)port)->buffer(0)->value_at(0)); } for (List::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*)port)->buffer(0)->value_at(0)); + ((TypedPort*)port)->buffer(0)->value_at(0)); }*/ } #endif diff --git a/grauph/src/libs/engine/PortBase.cpp b/grauph/src/libs/engine/TypedPort.cpp similarity index 100% rename from grauph/src/libs/engine/PortBase.cpp rename to grauph/src/libs/engine/TypedPort.cpp diff --git a/grauph/src/libs/engine/PortBase.h b/grauph/src/libs/engine/TypedPort.h similarity index 100% rename from grauph/src/libs/engine/PortBase.h rename to grauph/src/libs/engine/TypedPort.h diff --git a/grauph/src/libs/engine/events/RequestPortValueEvent.cpp b/grauph/src/libs/engine/events/RequestPortValueEvent.cpp index cd578460..e9766c9b 100644 --- a/grauph/src/libs/engine/events/RequestPortValueEvent.cpp +++ b/grauph/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*)m_port)->buffer(0)->value_at(offset); + m_value = ((TypedPort*)m_port)->buffer(0)->value_at(offset); else m_port = NULL; // triggers error response diff --git a/grauph/src/libs/engine/events/SetPortValueEvent.cpp b/grauph/src/libs/engine/events/SetPortValueEvent.cpp index 046e935f..73672248 100644 --- a/grauph/src/libs/engine/events/SetPortValueEvent.cpp +++ b/grauph/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*)m_port)->set_value(m_val, offset); + ((TypedPort*)m_port)->set_value(m_val, offset); else - ((PortBase*)m_port)->set_value(m_voice_num, m_val, offset); - //((PortBase*)m_port)->buffer(m_voice_num)->set(m_val, offset); // FIXME: check range + ((TypedPort*)m_port)->set_value(m_voice_num, m_val, offset); + //((TypedPort*)m_port)->buffer(m_voice_num)->set(m_val, offset); // FIXME: check range } } diff --git a/grauph/src/libs/engine/events/SetPortValueQueuedEvent.cpp b/grauph/src/libs/engine/events/SetPortValueQueuedEvent.cpp index c7750064..3e93b01b 100644 --- a/grauph/src/libs/engine/events/SetPortValueQueuedEvent.cpp +++ b/grauph/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*)m_port)->set_value(m_val, offset); + ((TypedPort*)m_port)->set_value(m_val, offset); else - ((PortBase*)m_port)->buffer(m_voice_num)->set(m_val, offset); // FIXME: check range + ((TypedPort*)m_port)->buffer(m_voice_num)->set(m_val, offset); // FIXME: check range } }