| @@ -294,7 +294,7 @@ void FilterGraph::setLastDocumentOpened (const File& file) | |||
| //============================================================================== | |||
| static XmlElement* createNodeXml (AudioProcessorGraph::Node* const node) throw() | |||
| { | |||
| AudioPluginInstance* plugin = dynamic_cast <AudioPluginInstance*> (node->processor); | |||
| AudioPluginInstance* plugin = dynamic_cast <AudioPluginInstance*> (node->getProcessor()); | |||
| if (plugin == 0) | |||
| { | |||
| @@ -318,7 +318,7 @@ static XmlElement* createNodeXml (AudioProcessorGraph::Node* const node) throw() | |||
| XmlElement* state = new XmlElement ("STATE"); | |||
| MemoryBlock m; | |||
| node->processor->getStateInformation (m); | |||
| node->getProcessor()->getStateInformation (m); | |||
| state->addTextElement (m.toBase64Encoding()); | |||
| e->addChildElement (state); | |||
| @@ -357,7 +357,7 @@ void FilterGraph::createNodeFromXml (const XmlElement& xml) | |||
| MemoryBlock m; | |||
| m.fromBase64Encoding (state->getAllSubText()); | |||
| node->processor->setStateInformation (m.getData(), (int) m.getSize()); | |||
| node->getProcessor()->setStateInformation (m.getData(), (int) m.getSize()); | |||
| } | |||
| node->properties.set ("x", xml.getDoubleAttribute (T("x"))); | |||
| @@ -77,7 +77,7 @@ PluginWindow* PluginWindow::getWindowFor (AudioProcessorGraph::Node* node, | |||
| if (! useGenericView) | |||
| { | |||
| ui = node->processor->createEditorIfNeeded(); | |||
| ui = node->getProcessor()->createEditorIfNeeded(); | |||
| if (ui == 0) | |||
| useGenericView = true; | |||
| @@ -85,12 +85,12 @@ PluginWindow* PluginWindow::getWindowFor (AudioProcessorGraph::Node* node, | |||
| if (useGenericView) | |||
| { | |||
| ui = new GenericAudioProcessorEditor (node->processor); | |||
| ui = new GenericAudioProcessorEditor (node->getProcessor()); | |||
| } | |||
| if (ui != 0) | |||
| { | |||
| AudioPluginInstance* const plugin = dynamic_cast <AudioPluginInstance*> (node->processor); | |||
| AudioPluginInstance* const plugin = dynamic_cast <AudioPluginInstance*> (node->getProcessor()); | |||
| if (plugin != 0) | |||
| ui->setName (plugin->getName()); | |||
| @@ -137,9 +137,9 @@ public: | |||
| String tip; | |||
| if (isInput) | |||
| tip = node->processor->getInputChannelName (index_); | |||
| tip = node->getProcessor()->getInputChannelName (index_); | |||
| else | |||
| tip = node->processor->getOutputChannelName (index_); | |||
| tip = node->getProcessor()->getOutputChannelName (index_); | |||
| if (tip.isEmpty()) | |||
| { | |||
| @@ -387,12 +387,12 @@ public: | |||
| return; | |||
| } | |||
| numIns = f->processor->getNumInputChannels(); | |||
| if (f->processor->acceptsMidi()) | |||
| numIns = f->getProcessor()->getNumInputChannels(); | |||
| if (f->getProcessor()->acceptsMidi()) | |||
| ++numIns; | |||
| numOuts = f->processor->getNumOutputChannels(); | |||
| if (f->processor->producesMidi()) | |||
| numOuts = f->getProcessor()->getNumOutputChannels(); | |||
| if (f->getProcessor()->producesMidi()) | |||
| ++numOuts; | |||
| int w = 100; | |||
| @@ -400,14 +400,14 @@ public: | |||
| w = jmax (w, (jmax (numIns, numOuts) + 1) * 20); | |||
| const int textWidth = font.getStringWidth (f->processor->getName()); | |||
| const int textWidth = font.getStringWidth (f->getProcessor()->getName()); | |||
| w = jmax (w, 16 + jmin (textWidth, 300)); | |||
| if (textWidth > 300) | |||
| h = 100; | |||
| setSize (w, h); | |||
| setName (f->processor->getName()); | |||
| setName (f->getProcessor()->getName()); | |||
| { | |||
| double x, y; | |||
| @@ -423,16 +423,16 @@ public: | |||
| deleteAllChildren(); | |||
| int i; | |||
| for (i = 0; i < f->processor->getNumInputChannels(); ++i) | |||
| for (i = 0; i < f->getProcessor()->getNumInputChannels(); ++i) | |||
| addAndMakeVisible (new PinComponent (graph, filterID, i, true)); | |||
| if (f->processor->acceptsMidi()) | |||
| if (f->getProcessor()->acceptsMidi()) | |||
| addAndMakeVisible (new PinComponent (graph, filterID, FilterGraph::midiChannelNumber, true)); | |||
| for (i = 0; i < f->processor->getNumOutputChannels(); ++i) | |||
| for (i = 0; i < f->getProcessor()->getNumOutputChannels(); ++i) | |||
| addAndMakeVisible (new PinComponent (graph, filterID, i, false)); | |||
| if (f->processor->producesMidi()) | |||
| if (f->getProcessor()->producesMidi()) | |||
| addAndMakeVisible (new PinComponent (graph, filterID, FilterGraph::midiChannelNumber, false)); | |||
| resized(); | |||
| @@ -36214,7 +36214,7 @@ public: | |||
| const int totalChans_, | |||
| const int midiBufferToUse_) | |||
| : node (node_), | |||
| processor (node_->processor), | |||
| processor (node_->getProcessor()), | |||
| audioChannelsToUse (audioChannelsToUse_), | |||
| totalChans (jmax (1, totalChans_)), | |||
| midiBufferToUse (midiBufferToUse_) | |||
| @@ -36293,8 +36293,8 @@ private: | |||
| Array<void*>& renderingOps, | |||
| const int ourRenderingIndex) | |||
| { | |||
| const int numIns = node->processor->getNumInputChannels(); | |||
| const int numOuts = node->processor->getNumOutputChannels(); | |||
| const int numIns = node->getProcessor()->getNumInputChannels(); | |||
| const int numOuts = node->getProcessor()->getNumOutputChannels(); | |||
| const int totalChans = jmax (numIns, numOuts); | |||
| Array <int> audioChannelsToUse; | |||
| @@ -36452,7 +36452,7 @@ private: | |||
| // No midi inputs.. | |||
| midiBufferToUse = getFreeBuffer (true); // need to pick a buffer even if the processor doesn't use midi | |||
| if (node->processor->acceptsMidi() || node->processor->producesMidi()) | |||
| if (node->getProcessor()->acceptsMidi() || node->getProcessor()->producesMidi()) | |||
| renderingOps.add (new ClearMidiBufferOp (midiBufferToUse)); | |||
| } | |||
| else if (midiSourceNodes.size() == 1) | |||
| @@ -36532,7 +36532,7 @@ private: | |||
| } | |||
| } | |||
| if (node->processor->producesMidi()) | |||
| if (node->getProcessor()->producesMidi()) | |||
| markBufferAsContaining (midiBufferToUse, node->id, | |||
| AudioProcessorGraph::midiChannelIndex); | |||
| @@ -36631,7 +36631,7 @@ private: | |||
| } | |||
| else | |||
| { | |||
| for (int i = 0; i < node->processor->getNumInputChannels(); ++i) | |||
| for (int i = 0; i < node->getProcessor()->getNumInputChannels(); ++i) | |||
| if (i != inputChannelOfIndexToIgnore | |||
| && graph.getConnectionBetween (nodeId, outputChanIndex, | |||
| node->id, i) != 0) | |||
| @@ -40817,9 +40817,8 @@ public: | |||
| */ | |||
| const uint32 id; | |||
| /** The actual processor object that this node represents. | |||
| */ | |||
| const ScopedPointer<AudioProcessor> processor; | |||
| /** The actual processor object that this node represents. */ | |||
| AudioProcessor* getProcessor() const throw() { return processor; } | |||
| /** A set of user-definable properties that are associated with this node. | |||
| @@ -40838,6 +40837,7 @@ public: | |||
| private: | |||
| friend class AudioProcessorGraph; | |||
| const ScopedPointer<AudioProcessor> processor; | |||
| bool isPrepared; | |||
| Node (uint32 id, AudioProcessor* processor); | |||
| @@ -501,7 +501,7 @@ public: | |||
| const int totalChans_, | |||
| const int midiBufferToUse_) | |||
| : node (node_), | |||
| processor (node_->processor), | |||
| processor (node_->getProcessor()), | |||
| audioChannelsToUse (audioChannelsToUse_), | |||
| totalChans (jmax (1, totalChans_)), | |||
| midiBufferToUse (midiBufferToUse_) | |||
| @@ -583,8 +583,8 @@ private: | |||
| Array<void*>& renderingOps, | |||
| const int ourRenderingIndex) | |||
| { | |||
| const int numIns = node->processor->getNumInputChannels(); | |||
| const int numOuts = node->processor->getNumOutputChannels(); | |||
| const int numIns = node->getProcessor()->getNumInputChannels(); | |||
| const int numOuts = node->getProcessor()->getNumOutputChannels(); | |||
| const int totalChans = jmax (numIns, numOuts); | |||
| Array <int> audioChannelsToUse; | |||
| @@ -742,7 +742,7 @@ private: | |||
| // No midi inputs.. | |||
| midiBufferToUse = getFreeBuffer (true); // need to pick a buffer even if the processor doesn't use midi | |||
| if (node->processor->acceptsMidi() || node->processor->producesMidi()) | |||
| if (node->getProcessor()->acceptsMidi() || node->getProcessor()->producesMidi()) | |||
| renderingOps.add (new ClearMidiBufferOp (midiBufferToUse)); | |||
| } | |||
| else if (midiSourceNodes.size() == 1) | |||
| @@ -822,7 +822,7 @@ private: | |||
| } | |||
| } | |||
| if (node->processor->producesMidi()) | |||
| if (node->getProcessor()->producesMidi()) | |||
| markBufferAsContaining (midiBufferToUse, node->id, | |||
| AudioProcessorGraph::midiChannelIndex); | |||
| @@ -922,7 +922,7 @@ private: | |||
| } | |||
| else | |||
| { | |||
| for (int i = 0; i < node->processor->getNumInputChannels(); ++i) | |||
| for (int i = 0; i < node->getProcessor()->getNumInputChannels(); ++i) | |||
| if (i != inputChannelOfIndexToIgnore | |||
| && graph.getConnectionBetween (nodeId, outputChanIndex, | |||
| node->id, i) != 0) | |||
| @@ -81,9 +81,8 @@ public: | |||
| */ | |||
| const uint32 id; | |||
| /** The actual processor object that this node represents. | |||
| */ | |||
| const ScopedPointer<AudioProcessor> processor; | |||
| /** The actual processor object that this node represents. */ | |||
| AudioProcessor* getProcessor() const throw() { return processor; } | |||
| /** A set of user-definable properties that are associated with this node. | |||
| @@ -104,6 +103,7 @@ public: | |||
| private: | |||
| friend class AudioProcessorGraph; | |||
| const ScopedPointer<AudioProcessor> processor; | |||
| bool isPrepared; | |||
| Node (uint32 id, AudioProcessor* processor); | |||