| @@ -189,7 +189,7 @@ void CarlaEngineClient::_addEventPortName(const bool isInput, const char* const | |||||
| static void getUniquePortName(CarlaString& sname, const CarlaStringList& list) | static void getUniquePortName(CarlaString& sname, const CarlaStringList& list) | ||||
| { | { | ||||
| for (CarlaStringList::Itenerator it = list.begin(); it.valid(); it.next()) | |||||
| for (CarlaStringList::Itenerator it = list.begin2(); it.valid(); it.next()) | |||||
| { | { | ||||
| const char* const portName(it.getValue(nullptr)); | const char* const portName(it.getValue(nullptr)); | ||||
| CARLA_SAFE_ASSERT_CONTINUE(portName != nullptr && portName[0] != '\0'); | CARLA_SAFE_ASSERT_CONTINUE(portName != nullptr && portName[0] != '\0'); | ||||
| @@ -91,7 +91,7 @@ ExternalGraphPorts::ExternalGraphPorts() noexcept | |||||
| const char* ExternalGraphPorts::getName(const bool isInput, const uint portId) const noexcept | const char* ExternalGraphPorts::getName(const bool isInput, const uint portId) const noexcept | ||||
| { | { | ||||
| for (LinkedList<PortNameToId>::Itenerator it = isInput ? ins.begin() : outs.begin(); it.valid(); it.next()) | |||||
| for (LinkedList<PortNameToId>::Itenerator it = isInput ? ins.begin2() : outs.begin2(); it.valid(); it.next()) | |||||
| { | { | ||||
| static const PortNameToId portNameFallback = { 0, 0, { '\0' }, { '\0' } }; | static const PortNameToId portNameFallback = { 0, 0, { '\0' }, { '\0' } }; | ||||
| @@ -107,7 +107,7 @@ const char* ExternalGraphPorts::getName(const bool isInput, const uint portId) c | |||||
| uint ExternalGraphPorts::getPortId(const bool isInput, const char portName[], bool* const ok) const noexcept | uint ExternalGraphPorts::getPortId(const bool isInput, const char portName[], bool* const ok) const noexcept | ||||
| { | { | ||||
| for (LinkedList<PortNameToId>::Itenerator it = isInput ? ins.begin() : outs.begin(); it.valid(); it.next()) | |||||
| for (LinkedList<PortNameToId>::Itenerator it = isInput ? ins.begin2() : outs.begin2(); it.valid(); it.next()) | |||||
| { | { | ||||
| static const PortNameToId portNameFallback = { 0, 0, { '\0' }, { '\0' } }; | static const PortNameToId portNameFallback = { 0, 0, { '\0' }, { '\0' } }; | ||||
| @@ -230,7 +230,7 @@ bool ExternalGraph::disconnect(const uint connectionId) noexcept | |||||
| { | { | ||||
| CARLA_SAFE_ASSERT_RETURN(connections.list.count() > 0, false); | CARLA_SAFE_ASSERT_RETURN(connections.list.count() > 0, false); | ||||
| for (LinkedList<ConnectionToId>::Itenerator it=connections.list.begin(); it.valid(); it.next()) | |||||
| for (LinkedList<ConnectionToId>::Itenerator it=connections.list.begin2(); it.valid(); it.next()) | |||||
| { | { | ||||
| static const ConnectionToId fallback = { 0, 0, 0, 0, 0 }; | static const ConnectionToId fallback = { 0, 0, 0, 0, 0 }; | ||||
| @@ -347,7 +347,7 @@ void ExternalGraph::refresh(const char* const deviceName) | |||||
| const CarlaString groupName(strBuf); | const CarlaString groupName(strBuf); | ||||
| int h = 0; | int h = 0; | ||||
| for (LinkedList<PortNameToId>::Itenerator it = audioPorts.ins.begin(); it.valid(); it.next()) | |||||
| for (LinkedList<PortNameToId>::Itenerator it = audioPorts.ins.begin2(); it.valid(); it.next()) | |||||
| { | { | ||||
| PortNameToId& portNameToId(it.getValue()); | PortNameToId& portNameToId(it.getValue()); | ||||
| portNameToId.setFullName(groupName + portNameToId.name); | portNameToId.setFullName(groupName + portNameToId.name); | ||||
| @@ -370,7 +370,7 @@ void ExternalGraph::refresh(const char* const deviceName) | |||||
| const CarlaString groupName(strBuf); | const CarlaString groupName(strBuf); | ||||
| int h = 0; | int h = 0; | ||||
| for (LinkedList<PortNameToId>::Itenerator it = audioPorts.outs.begin(); it.valid(); it.next()) | |||||
| for (LinkedList<PortNameToId>::Itenerator it = audioPorts.outs.begin2(); it.valid(); it.next()) | |||||
| { | { | ||||
| PortNameToId& portNameToId(it.getValue()); | PortNameToId& portNameToId(it.getValue()); | ||||
| portNameToId.setFullName(groupName + portNameToId.name); | portNameToId.setFullName(groupName + portNameToId.name); | ||||
| @@ -387,7 +387,7 @@ void ExternalGraph::refresh(const char* const deviceName) | |||||
| const CarlaString groupNamePlus("Readable MIDI ports:"); | const CarlaString groupNamePlus("Readable MIDI ports:"); | ||||
| int h = 0; | int h = 0; | ||||
| for (LinkedList<PortNameToId>::Itenerator it = midiPorts.ins.begin(); it.valid(); it.next()) | |||||
| for (LinkedList<PortNameToId>::Itenerator it = midiPorts.ins.begin2(); it.valid(); it.next()) | |||||
| { | { | ||||
| PortNameToId& portNameToId(it.getValue()); | PortNameToId& portNameToId(it.getValue()); | ||||
| portNameToId.setFullName(groupNamePlus + portNameToId.name); | portNameToId.setFullName(groupNamePlus + portNameToId.name); | ||||
| @@ -404,7 +404,7 @@ void ExternalGraph::refresh(const char* const deviceName) | |||||
| const CarlaString groupNamePlus("Writable MIDI ports:"); | const CarlaString groupNamePlus("Writable MIDI ports:"); | ||||
| int h = 0; | int h = 0; | ||||
| for (LinkedList<PortNameToId>::Itenerator it = midiPorts.outs.begin(); it.valid(); it.next()) | |||||
| for (LinkedList<PortNameToId>::Itenerator it = midiPorts.outs.begin2(); it.valid(); it.next()) | |||||
| { | { | ||||
| PortNameToId& portNameToId(it.getValue()); | PortNameToId& portNameToId(it.getValue()); | ||||
| portNameToId.setFullName(groupNamePlus + portNameToId.name); | portNameToId.setFullName(groupNamePlus + portNameToId.name); | ||||
| @@ -425,7 +425,7 @@ const char* const* ExternalGraph::getConnections() const noexcept | |||||
| char strBuf[STR_MAX+1]; | char strBuf[STR_MAX+1]; | ||||
| strBuf[STR_MAX] = '\0'; | strBuf[STR_MAX] = '\0'; | ||||
| for (LinkedList<ConnectionToId>::Itenerator it=connections.list.begin(); it.valid(); it.next()) | |||||
| for (LinkedList<ConnectionToId>::Itenerator it=connections.list.begin2(); it.valid(); it.next()) | |||||
| { | { | ||||
| static const ConnectionToId fallback = { 0, 0, 0, 0, 0 }; | static const ConnectionToId fallback = { 0, 0, 0, 0, 0 }; | ||||
| @@ -692,7 +692,7 @@ void RackGraph::refresh(const char* const deviceName) | |||||
| // Connections | // Connections | ||||
| const CarlaRecursiveMutexLocker cml(audioBuffers.mutex); | const CarlaRecursiveMutexLocker cml(audioBuffers.mutex); | ||||
| for (LinkedList<uint>::Itenerator it = audioBuffers.connectedIn1.begin(); it.valid(); it.next()) | |||||
| for (LinkedList<uint>::Itenerator it = audioBuffers.connectedIn1.begin2(); it.valid(); it.next()) | |||||
| { | { | ||||
| const uint& portId(it.getValue(0)); | const uint& portId(it.getValue(0)); | ||||
| CARLA_SAFE_ASSERT_CONTINUE(portId > 0); | CARLA_SAFE_ASSERT_CONTINUE(portId > 0); | ||||
| @@ -708,7 +708,7 @@ void RackGraph::refresh(const char* const deviceName) | |||||
| extGraph.connections.list.append(connectionToId); | extGraph.connections.list.append(connectionToId); | ||||
| } | } | ||||
| for (LinkedList<uint>::Itenerator it = audioBuffers.connectedIn2.begin(); it.valid(); it.next()) | |||||
| for (LinkedList<uint>::Itenerator it = audioBuffers.connectedIn2.begin2(); it.valid(); it.next()) | |||||
| { | { | ||||
| const uint& portId(it.getValue(0)); | const uint& portId(it.getValue(0)); | ||||
| CARLA_SAFE_ASSERT_CONTINUE(portId > 0); | CARLA_SAFE_ASSERT_CONTINUE(portId > 0); | ||||
| @@ -724,7 +724,7 @@ void RackGraph::refresh(const char* const deviceName) | |||||
| extGraph.connections.list.append(connectionToId); | extGraph.connections.list.append(connectionToId); | ||||
| } | } | ||||
| for (LinkedList<uint>::Itenerator it = audioBuffers.connectedOut1.begin(); it.valid(); it.next()) | |||||
| for (LinkedList<uint>::Itenerator it = audioBuffers.connectedOut1.begin2(); it.valid(); it.next()) | |||||
| { | { | ||||
| const uint& portId(it.getValue(0)); | const uint& portId(it.getValue(0)); | ||||
| CARLA_SAFE_ASSERT_CONTINUE(portId > 0); | CARLA_SAFE_ASSERT_CONTINUE(portId > 0); | ||||
| @@ -740,7 +740,7 @@ void RackGraph::refresh(const char* const deviceName) | |||||
| extGraph.connections.list.append(connectionToId); | extGraph.connections.list.append(connectionToId); | ||||
| } | } | ||||
| for (LinkedList<uint>::Itenerator it = audioBuffers.connectedOut2.begin(); it.valid(); it.next()) | |||||
| for (LinkedList<uint>::Itenerator it = audioBuffers.connectedOut2.begin2(); it.valid(); it.next()) | |||||
| { | { | ||||
| const uint& portId(it.getValue(0)); | const uint& portId(it.getValue(0)); | ||||
| CARLA_SAFE_ASSERT_CONTINUE(portId > 0); | CARLA_SAFE_ASSERT_CONTINUE(portId > 0); | ||||
| @@ -906,7 +906,7 @@ void RackGraph::processHelper(CarlaEngine::ProtectedData* const data, const floa | |||||
| bool noConnections = true; | bool noConnections = true; | ||||
| // connect input buffers | // connect input buffers | ||||
| for (LinkedList<uint>::Itenerator it = audioBuffers.connectedIn1.begin(); it.valid(); it.next()) | |||||
| for (LinkedList<uint>::Itenerator it = audioBuffers.connectedIn1.begin2(); it.valid(); it.next()) | |||||
| { | { | ||||
| const uint& port(it.getValue(0)); | const uint& port(it.getValue(0)); | ||||
| CARLA_SAFE_ASSERT_CONTINUE(port > 0); | CARLA_SAFE_ASSERT_CONTINUE(port > 0); | ||||
| @@ -928,7 +928,7 @@ void RackGraph::processHelper(CarlaEngine::ProtectedData* const data, const floa | |||||
| noConnections = true; | noConnections = true; | ||||
| for (LinkedList<uint>::Itenerator it = audioBuffers.connectedIn2.begin(); it.valid(); it.next()) | |||||
| for (LinkedList<uint>::Itenerator it = audioBuffers.connectedIn2.begin2(); it.valid(); it.next()) | |||||
| { | { | ||||
| const uint& port(it.getValue(0)); | const uint& port(it.getValue(0)); | ||||
| CARLA_SAFE_ASSERT_CONTINUE(port > 0); | CARLA_SAFE_ASSERT_CONTINUE(port > 0); | ||||
| @@ -963,7 +963,7 @@ void RackGraph::processHelper(CarlaEngine::ProtectedData* const data, const floa | |||||
| // connect output buffers | // connect output buffers | ||||
| if (audioBuffers.connectedOut1.count() != 0) | if (audioBuffers.connectedOut1.count() != 0) | ||||
| { | { | ||||
| for (LinkedList<uint>::Itenerator it = audioBuffers.connectedOut1.begin(); it.valid(); it.next()) | |||||
| for (LinkedList<uint>::Itenerator it = audioBuffers.connectedOut1.begin2(); it.valid(); it.next()) | |||||
| { | { | ||||
| const uint& port(it.getValue(0)); | const uint& port(it.getValue(0)); | ||||
| CARLA_SAFE_ASSERT_CONTINUE(port > 0); | CARLA_SAFE_ASSERT_CONTINUE(port > 0); | ||||
| @@ -975,7 +975,7 @@ void RackGraph::processHelper(CarlaEngine::ProtectedData* const data, const floa | |||||
| if (audioBuffers.connectedOut2.count() != 0) | if (audioBuffers.connectedOut2.count() != 0) | ||||
| { | { | ||||
| for (LinkedList<uint>::Itenerator it = audioBuffers.connectedOut2.begin(); it.valid(); it.next()) | |||||
| for (LinkedList<uint>::Itenerator it = audioBuffers.connectedOut2.begin2(); it.valid(); it.next()) | |||||
| { | { | ||||
| const uint& port(it.getValue(0)); | const uint& port(it.getValue(0)); | ||||
| CARLA_SAFE_ASSERT_CONTINUE(port > 0); | CARLA_SAFE_ASSERT_CONTINUE(port > 0); | ||||
| @@ -1578,7 +1578,7 @@ bool PatchbayGraph::disconnect(const uint connectionId) | |||||
| if (usingExternal) | if (usingExternal) | ||||
| return extGraph.disconnect(connectionId); | return extGraph.disconnect(connectionId); | ||||
| for (LinkedList<ConnectionToId>::Itenerator it=connections.list.begin(); it.valid(); it.next()) | |||||
| for (LinkedList<ConnectionToId>::Itenerator it=connections.list.begin2(); it.valid(); it.next()) | |||||
| { | { | ||||
| static const ConnectionToId fallback = { 0, 0, 0, 0, 0 }; | static const ConnectionToId fallback = { 0, 0, 0, 0, 0 }; | ||||
| @@ -1614,7 +1614,7 @@ void PatchbayGraph::disconnectInternalGroup(const uint groupId) noexcept | |||||
| { | { | ||||
| CARLA_SAFE_ASSERT(! usingExternal); | CARLA_SAFE_ASSERT(! usingExternal); | ||||
| for (LinkedList<ConnectionToId>::Itenerator it=connections.list.begin(); it.valid(); it.next()) | |||||
| for (LinkedList<ConnectionToId>::Itenerator it=connections.list.begin2(); it.valid(); it.next()) | |||||
| { | { | ||||
| static const ConnectionToId fallback = { 0, 0, 0, 0, 0 }; | static const ConnectionToId fallback = { 0, 0, 0, 0, 0 }; | ||||
| @@ -1718,7 +1718,7 @@ const char* const* PatchbayGraph::getConnections(const bool external) const | |||||
| CarlaStringList connList; | CarlaStringList connList; | ||||
| for (LinkedList<ConnectionToId>::Itenerator it=connections.list.begin(); it.valid(); it.next()) | |||||
| for (LinkedList<ConnectionToId>::Itenerator it=connections.list.begin2(); it.valid(); it.next()) | |||||
| { | { | ||||
| static const ConnectionToId fallback = { 0, 0, 0, 0, 0 }; | static const ConnectionToId fallback = { 0, 0, 0, 0, 0 }; | ||||
| @@ -590,7 +590,7 @@ public: | |||||
| void invalidate() noexcept | void invalidate() noexcept | ||||
| { | { | ||||
| for (LinkedList<CarlaEngineJackAudioPort*>::Itenerator it = fAudioPorts.begin(); it.valid(); it.next()) | |||||
| for (LinkedList<CarlaEngineJackAudioPort*>::Itenerator it = fAudioPorts.begin2(); it.valid(); it.next()) | |||||
| { | { | ||||
| CarlaEngineJackAudioPort* const port(it.getValue(nullptr)); | CarlaEngineJackAudioPort* const port(it.getValue(nullptr)); | ||||
| CARLA_SAFE_ASSERT_CONTINUE(port != nullptr); | CARLA_SAFE_ASSERT_CONTINUE(port != nullptr); | ||||
| @@ -598,7 +598,7 @@ public: | |||||
| port->invalidate(); | port->invalidate(); | ||||
| } | } | ||||
| for (LinkedList<CarlaEngineJackCVPort*>::Itenerator it = fCVPorts.begin(); it.valid(); it.next()) | |||||
| for (LinkedList<CarlaEngineJackCVPort*>::Itenerator it = fCVPorts.begin2(); it.valid(); it.next()) | |||||
| { | { | ||||
| CarlaEngineJackCVPort* const port(it.getValue(nullptr)); | CarlaEngineJackCVPort* const port(it.getValue(nullptr)); | ||||
| CARLA_SAFE_ASSERT_CONTINUE(port != nullptr); | CARLA_SAFE_ASSERT_CONTINUE(port != nullptr); | ||||
| @@ -606,7 +606,7 @@ public: | |||||
| port->invalidate(); | port->invalidate(); | ||||
| } | } | ||||
| for (LinkedList<CarlaEngineJackEventPort*>::Itenerator it = fEventPorts.begin(); it.valid(); it.next()) | |||||
| for (LinkedList<CarlaEngineJackEventPort*>::Itenerator it = fEventPorts.begin2(); it.valid(); it.next()) | |||||
| { | { | ||||
| CarlaEngineJackEventPort* const port(it.getValue(nullptr)); | CarlaEngineJackEventPort* const port(it.getValue(nullptr)); | ||||
| CARLA_SAFE_ASSERT_CONTINUE(port != nullptr); | CARLA_SAFE_ASSERT_CONTINUE(port != nullptr); | ||||
| @@ -924,7 +924,7 @@ public: | |||||
| LinkedList<uint> newPlugins; | LinkedList<uint> newPlugins; | ||||
| fNewGroups.moveTo(newPlugins); | fNewGroups.moveTo(newPlugins); | ||||
| for (LinkedList<uint>::Itenerator it = newPlugins.begin(); it.valid(); it.next()) | |||||
| for (LinkedList<uint>::Itenerator it = newPlugins.begin2(); it.valid(); it.next()) | |||||
| { | { | ||||
| const uint groupId(it.getValue(0)); | const uint groupId(it.getValue(0)); | ||||
| CARLA_SAFE_ASSERT_CONTINUE(groupId > 0); | CARLA_SAFE_ASSERT_CONTINUE(groupId > 0); | ||||
| @@ -1135,7 +1135,7 @@ public: | |||||
| if (pData->options.processMode == ENGINE_PROCESS_MODE_PATCHBAY && ! fExternalPatchbay) | if (pData->options.processMode == ENGINE_PROCESS_MODE_PATCHBAY && ! fExternalPatchbay) | ||||
| return CarlaEngine::patchbayDisconnect(connectionId); | return CarlaEngine::patchbayDisconnect(connectionId); | ||||
| for (LinkedList<ConnectionToId>::Itenerator it = fUsedConnections.list.begin(); it.valid(); it.next()) | |||||
| for (LinkedList<ConnectionToId>::Itenerator it = fUsedConnections.list.begin2(); it.valid(); it.next()) | |||||
| { | { | ||||
| static const ConnectionToId fallback = { 0, 0, 0, 0, 0 }; | static const ConnectionToId fallback = { 0, 0, 0, 0, 0 }; | ||||
| @@ -1632,7 +1632,7 @@ protected: | |||||
| } | } | ||||
| else | else | ||||
| { | { | ||||
| for (LinkedList<ConnectionToId>::Itenerator it = fUsedConnections.list.begin(); it.valid(); it.next()) | |||||
| for (LinkedList<ConnectionToId>::Itenerator it = fUsedConnections.list.begin2(); it.valid(); it.next()) | |||||
| { | { | ||||
| static const ConnectionToId fallback = { 0, 0, 0, 0, 0 }; | static const ConnectionToId fallback = { 0, 0, 0, 0, 0 }; | ||||
| @@ -1658,7 +1658,7 @@ protected: | |||||
| // ignore this if on internal patchbay mode | // ignore this if on internal patchbay mode | ||||
| if (! fExternalPatchbay) return; | if (! fExternalPatchbay) return; | ||||
| for (LinkedList<GroupNameToId>::Itenerator it = fUsedGroups.list.begin(); it.valid(); it.next()) | |||||
| for (LinkedList<GroupNameToId>::Itenerator it = fUsedGroups.list.begin2(); it.valid(); it.next()) | |||||
| { | { | ||||
| static GroupNameToId groupNameFallback = { 0, { '\0' } }; | static GroupNameToId groupNameFallback = { 0, { '\0' } }; | ||||
| @@ -1697,7 +1697,7 @@ protected: | |||||
| const uint groupId(fUsedGroups.getGroupId(groupName)); | const uint groupId(fUsedGroups.getGroupId(groupName)); | ||||
| CARLA_SAFE_ASSERT_RETURN(groupId > 0,); | CARLA_SAFE_ASSERT_RETURN(groupId > 0,); | ||||
| for (LinkedList<PortNameToId>::Itenerator it = fUsedPorts.list.begin(); it.valid(); it.next()) | |||||
| for (LinkedList<PortNameToId>::Itenerator it = fUsedPorts.list.begin2(); it.valid(); it.next()) | |||||
| { | { | ||||
| static PortNameToId portNameFallback = { 0, 0, { '\0' }, { '\0' } }; | static PortNameToId portNameFallback = { 0, 0, { '\0' }, { '\0' } }; | ||||
| @@ -203,7 +203,7 @@ public: | |||||
| pData->graph.destroy(); | pData->graph.destroy(); | ||||
| for (LinkedList<MidiInPort>::Itenerator it = fMidiIns.begin(); it.valid(); it.next()) | |||||
| for (LinkedList<MidiInPort>::Itenerator it = fMidiIns.begin2(); it.valid(); it.next()) | |||||
| { | { | ||||
| MidiInPort& inPort(it.getValue()); | MidiInPort& inPort(it.getValue()); | ||||
| CARLA_SAFE_ASSERT_CONTINUE(inPort.port != nullptr); | CARLA_SAFE_ASSERT_CONTINUE(inPort.port != nullptr); | ||||
| @@ -217,7 +217,7 @@ public: | |||||
| fMidiOutMutex.lock(); | fMidiOutMutex.lock(); | ||||
| for (LinkedList<MidiOutPort>::Itenerator it = fMidiOuts.begin(); it.valid(); it.next()) | |||||
| for (LinkedList<MidiOutPort>::Itenerator it = fMidiOuts.begin2(); it.valid(); it.next()) | |||||
| { | { | ||||
| MidiOutPort& outPort(it.getValue()); | MidiOutPort& outPort(it.getValue()); | ||||
| CARLA_SAFE_ASSERT_CONTINUE(outPort.port != nullptr); | CARLA_SAFE_ASSERT_CONTINUE(outPort.port != nullptr); | ||||
| @@ -348,7 +348,7 @@ public: | |||||
| // --------------------------------------------------------------- | // --------------------------------------------------------------- | ||||
| // add midi connections | // add midi connections | ||||
| for (LinkedList<MidiInPort>::Itenerator it=fMidiIns.begin(); it.valid(); it.next()) | |||||
| for (LinkedList<MidiInPort>::Itenerator it=fMidiIns.begin2(); it.valid(); it.next()) | |||||
| { | { | ||||
| const MidiInPort& inPort(it.getValue()); | const MidiInPort& inPort(it.getValue()); | ||||
| @@ -367,7 +367,7 @@ public: | |||||
| fMidiOutMutex.lock(); | fMidiOutMutex.lock(); | ||||
| for (LinkedList<MidiOutPort>::Itenerator it=fMidiOuts.begin(); it.valid(); it.next()) | |||||
| for (LinkedList<MidiOutPort>::Itenerator it=fMidiOuts.begin2(); it.valid(); it.next()) | |||||
| { | { | ||||
| const MidiOutPort& outPort(it.getValue()); | const MidiOutPort& outPort(it.getValue()); | ||||
| @@ -438,7 +438,7 @@ protected: | |||||
| uint32_t engineEventIndex = 0; | uint32_t engineEventIndex = 0; | ||||
| fMidiInEvents.splice(); | fMidiInEvents.splice(); | ||||
| for (LinkedList<RtMidiEvent>::Itenerator it = fMidiInEvents.data.begin(); it.valid(); it.next()) | |||||
| for (LinkedList<RtMidiEvent>::Itenerator it = fMidiInEvents.data.begin2(); it.valid(); it.next()) | |||||
| { | { | ||||
| const RtMidiEvent& midiEvent(it.getValue()); | const RtMidiEvent& midiEvent(it.getValue()); | ||||
| EngineEvent& engineEvent(pData->events.in[engineEventIndex++]); | EngineEvent& engineEvent(pData->events.in[engineEventIndex++]); | ||||
| @@ -508,7 +508,7 @@ protected: | |||||
| { | { | ||||
| MidiMessage message(static_cast<const void*>(dataPtr), static_cast<int>(size), static_cast<double>(engineEvent.time)/nframes); | MidiMessage message(static_cast<const void*>(dataPtr), static_cast<int>(size), static_cast<double>(engineEvent.time)/nframes); | ||||
| for (LinkedList<MidiOutPort>::Itenerator it=fMidiOuts.begin(); it.valid(); it.next()) | |||||
| for (LinkedList<MidiOutPort>::Itenerator it=fMidiOuts.begin2(); it.valid(); it.next()) | |||||
| { | { | ||||
| MidiOutPort& outPort(it.getValue()); | MidiOutPort& outPort(it.getValue()); | ||||
| CARLA_SAFE_ASSERT_CONTINUE(outPort.port != nullptr); | CARLA_SAFE_ASSERT_CONTINUE(outPort.port != nullptr); | ||||
| @@ -633,7 +633,7 @@ protected: | |||||
| return CarlaEngine::disconnectExternalGraphPort(connectionType, portId, portName); | return CarlaEngine::disconnectExternalGraphPort(connectionType, portId, portName); | ||||
| case kExternalGraphConnectionMidiInput: | case kExternalGraphConnectionMidiInput: | ||||
| for (LinkedList<MidiInPort>::Itenerator it=fMidiIns.begin(); it.valid(); it.next()) | |||||
| for (LinkedList<MidiInPort>::Itenerator it=fMidiIns.begin2(); it.valid(); it.next()) | |||||
| { | { | ||||
| MidiInPort& inPort(it.getValue()); | MidiInPort& inPort(it.getValue()); | ||||
| CARLA_SAFE_ASSERT_CONTINUE(inPort.port != nullptr); | CARLA_SAFE_ASSERT_CONTINUE(inPort.port != nullptr); | ||||
| @@ -652,7 +652,7 @@ protected: | |||||
| case kExternalGraphConnectionMidiOutput: { | case kExternalGraphConnectionMidiOutput: { | ||||
| const CarlaMutexLocker cml(fMidiOutMutex); | const CarlaMutexLocker cml(fMidiOutMutex); | ||||
| for (LinkedList<MidiOutPort>::Itenerator it=fMidiOuts.begin(); it.valid(); it.next()) | |||||
| for (LinkedList<MidiOutPort>::Itenerator it=fMidiOuts.begin2(); it.valid(); it.next()) | |||||
| { | { | ||||
| MidiOutPort& outPort(it.getValue()); | MidiOutPort& outPort(it.getValue()); | ||||
| CARLA_SAFE_ASSERT_CONTINUE(outPort.port != nullptr); | CARLA_SAFE_ASSERT_CONTINUE(outPort.port != nullptr); | ||||
| @@ -57,10 +57,8 @@ static void initRtAudioAPIsIfNeeded() | |||||
| std::vector<RtAudio::Api> apis; | std::vector<RtAudio::Api> apis; | ||||
| RtAudio::getCompiledApi(apis); | RtAudio::getCompiledApi(apis); | ||||
| for (std::vector<RtAudio::Api>::iterator it = apis.begin(), end = apis.end(); it != end; ++it) | |||||
| for (const RtAudio::Api& api : apis) | |||||
| { | { | ||||
| const RtAudio::Api& api(*it); | |||||
| if (api == RtAudio::MACOSX_CORE) | if (api == RtAudio::MACOSX_CORE) | ||||
| continue; | continue; | ||||
| if (api == RtAudio::WINDOWS_ASIO) | if (api == RtAudio::WINDOWS_ASIO) | ||||
| @@ -339,7 +337,7 @@ public: | |||||
| pData->graph.destroy(); | pData->graph.destroy(); | ||||
| for (LinkedList<MidiInPort>::Itenerator it = fMidiIns.begin(); it.valid(); it.next()) | |||||
| for (LinkedList<MidiInPort>::Itenerator it = fMidiIns.begin2(); it.valid(); it.next()) | |||||
| { | { | ||||
| static MidiInPort fallback = { nullptr, { '\0' } }; | static MidiInPort fallback = { nullptr, { '\0' } }; | ||||
| @@ -356,7 +354,7 @@ public: | |||||
| fMidiOutMutex.lock(); | fMidiOutMutex.lock(); | ||||
| for (LinkedList<MidiOutPort>::Itenerator it = fMidiOuts.begin(); it.valid(); it.next()) | |||||
| for (LinkedList<MidiOutPort>::Itenerator it = fMidiOuts.begin2(); it.valid(); it.next()) | |||||
| { | { | ||||
| static MidiOutPort fallback = { nullptr, { '\0' } }; | static MidiOutPort fallback = { nullptr, { '\0' } }; | ||||
| @@ -480,7 +478,7 @@ public: | |||||
| // --------------------------------------------------------------- | // --------------------------------------------------------------- | ||||
| // add midi connections | // add midi connections | ||||
| for (LinkedList<MidiInPort>::Itenerator it=fMidiIns.begin(); it.valid(); it.next()) | |||||
| for (LinkedList<MidiInPort>::Itenerator it=fMidiIns.begin2(); it.valid(); it.next()) | |||||
| { | { | ||||
| static const MidiInPort fallback = { nullptr, { '\0' } }; | static const MidiInPort fallback = { nullptr, { '\0' } }; | ||||
| @@ -503,7 +501,7 @@ public: | |||||
| fMidiOutMutex.lock(); | fMidiOutMutex.lock(); | ||||
| for (LinkedList<MidiOutPort>::Itenerator it=fMidiOuts.begin(); it.valid(); it.next()) | |||||
| for (LinkedList<MidiOutPort>::Itenerator it=fMidiOuts.begin2(); it.valid(); it.next()) | |||||
| { | { | ||||
| static const MidiOutPort fallback = { nullptr, { '\0' } }; | static const MidiOutPort fallback = { nullptr, { '\0' } }; | ||||
| @@ -609,7 +607,7 @@ protected: | |||||
| uint32_t engineEventIndex = 0; | uint32_t engineEventIndex = 0; | ||||
| fMidiInEvents.splice(); | fMidiInEvents.splice(); | ||||
| for (LinkedList<RtMidiEvent>::Itenerator it = fMidiInEvents.data.begin(); it.valid(); it.next()) | |||||
| for (LinkedList<RtMidiEvent>::Itenerator it = fMidiInEvents.data.begin2(); it.valid(); it.next()) | |||||
| { | { | ||||
| static const RtMidiEvent fallback = { 0, 0, { 0 } }; | static const RtMidiEvent fallback = { 0, 0, { 0 } }; | ||||
| @@ -683,7 +681,7 @@ protected: | |||||
| { | { | ||||
| fMidiOutVector.assign(dataPtr, dataPtr + size); | fMidiOutVector.assign(dataPtr, dataPtr + size); | ||||
| for (LinkedList<MidiOutPort>::Itenerator it=fMidiOuts.begin(); it.valid(); it.next()) | |||||
| for (LinkedList<MidiOutPort>::Itenerator it=fMidiOuts.begin2(); it.valid(); it.next()) | |||||
| { | { | ||||
| static MidiOutPort fallback = { nullptr, { '\0' } }; | static MidiOutPort fallback = { nullptr, { '\0' } }; | ||||
| @@ -869,7 +867,7 @@ protected: | |||||
| return CarlaEngine::disconnectExternalGraphPort(connectionType, portId, portName); | return CarlaEngine::disconnectExternalGraphPort(connectionType, portId, portName); | ||||
| case kExternalGraphConnectionMidiInput: | case kExternalGraphConnectionMidiInput: | ||||
| for (LinkedList<MidiInPort>::Itenerator it=fMidiIns.begin(); it.valid(); it.next()) | |||||
| for (LinkedList<MidiInPort>::Itenerator it=fMidiIns.begin2(); it.valid(); it.next()) | |||||
| { | { | ||||
| static MidiInPort fallback = { nullptr, { '\0' } }; | static MidiInPort fallback = { nullptr, { '\0' } }; | ||||
| @@ -891,7 +889,7 @@ protected: | |||||
| case kExternalGraphConnectionMidiOutput: { | case kExternalGraphConnectionMidiOutput: { | ||||
| const CarlaMutexLocker cml(fMidiOutMutex); | const CarlaMutexLocker cml(fMidiOutMutex); | ||||
| for (LinkedList<MidiOutPort>::Itenerator it=fMidiOuts.begin(); it.valid(); it.next()) | |||||
| for (LinkedList<MidiOutPort>::Itenerator it=fMidiOuts.begin2(); it.valid(); it.next()) | |||||
| { | { | ||||
| static MidiOutPort fallback = { nullptr, { '\0' } }; | static MidiOutPort fallback = { nullptr, { '\0' } }; | ||||
| @@ -601,7 +601,7 @@ const CarlaStateSave& CarlaPlugin::getStateSave(const bool callPrepareForSave) | |||||
| // --------------------------------------------------------------- | // --------------------------------------------------------------- | ||||
| // Custom Data | // Custom Data | ||||
| for (LinkedList<CustomData>::Itenerator it = pData->custom.begin(); it.valid(); it.next()) | |||||
| for (LinkedList<CustomData>::Itenerator it = pData->custom.begin2(); it.valid(); it.next()) | |||||
| { | { | ||||
| const CustomData& cData(it.getValue(kCustomDataFallback)); | const CustomData& cData(it.getValue(kCustomDataFallback)); | ||||
| CARLA_SAFE_ASSERT_CONTINUE(cData.isValid()); | CARLA_SAFE_ASSERT_CONTINUE(cData.isValid()); | ||||
| @@ -628,7 +628,7 @@ void CarlaPlugin::loadStateSave(const CarlaStateSave& stateSave) | |||||
| // --------------------------------------------------------------- | // --------------------------------------------------------------- | ||||
| // Part 1 - PRE-set custom data (only those which reload programs) | // Part 1 - PRE-set custom data (only those which reload programs) | ||||
| for (CarlaStateSave::CustomDataItenerator it = stateSave.customData.begin(); it.valid(); it.next()) | |||||
| for (CarlaStateSave::CustomDataItenerator it = stateSave.customData.begin2(); it.valid(); it.next()) | |||||
| { | { | ||||
| const CarlaStateSave::CustomData* const stateCustomData(it.getValue(nullptr)); | const CarlaStateSave::CustomData* const stateCustomData(it.getValue(nullptr)); | ||||
| CARLA_SAFE_ASSERT_CONTINUE(stateCustomData != nullptr); | CARLA_SAFE_ASSERT_CONTINUE(stateCustomData != nullptr); | ||||
| @@ -712,7 +712,7 @@ void CarlaPlugin::loadStateSave(const CarlaStateSave& stateSave) | |||||
| const float sampleRate(static_cast<float>(pData->engine->getSampleRate())); | const float sampleRate(static_cast<float>(pData->engine->getSampleRate())); | ||||
| for (CarlaStateSave::ParameterItenerator it = stateSave.parameters.begin(); it.valid(); it.next()) | |||||
| for (CarlaStateSave::ParameterItenerator it = stateSave.parameters.begin2(); it.valid(); it.next()) | |||||
| { | { | ||||
| CarlaStateSave::Parameter* const stateParameter(it.getValue(nullptr)); | CarlaStateSave::Parameter* const stateParameter(it.getValue(nullptr)); | ||||
| CARLA_SAFE_ASSERT_CONTINUE(stateParameter != nullptr); | CARLA_SAFE_ASSERT_CONTINUE(stateParameter != nullptr); | ||||
| @@ -724,7 +724,7 @@ void CarlaPlugin::loadStateSave(const CarlaStateSave& stateSave) | |||||
| // Try to set by symbol, otherwise use index | // Try to set by symbol, otherwise use index | ||||
| if (stateParameter->symbol != nullptr && stateParameter->symbol[0] != '\0') | if (stateParameter->symbol != nullptr && stateParameter->symbol[0] != '\0') | ||||
| { | { | ||||
| for (LinkedList<ParamSymbol*>::Itenerator it2 = paramSymbols.begin(); it2.valid(); it2.next()) | |||||
| for (LinkedList<ParamSymbol*>::Itenerator it2 = paramSymbols.begin2(); it2.valid(); it2.next()) | |||||
| { | { | ||||
| ParamSymbol* const paramSymbol(it2.getValue(nullptr)); | ParamSymbol* const paramSymbol(it2.getValue(nullptr)); | ||||
| CARLA_SAFE_ASSERT_CONTINUE(paramSymbol != nullptr); | CARLA_SAFE_ASSERT_CONTINUE(paramSymbol != nullptr); | ||||
| @@ -747,7 +747,7 @@ void CarlaPlugin::loadStateSave(const CarlaStateSave& stateSave) | |||||
| // Symbol only | // Symbol only | ||||
| if (stateParameter->symbol != nullptr && stateParameter->symbol[0] != '\0') | if (stateParameter->symbol != nullptr && stateParameter->symbol[0] != '\0') | ||||
| { | { | ||||
| for (LinkedList<ParamSymbol*>::Itenerator it2 = paramSymbols.begin(); it2.valid(); it2.next()) | |||||
| for (LinkedList<ParamSymbol*>::Itenerator it2 = paramSymbols.begin2(); it2.valid(); it2.next()) | |||||
| { | { | ||||
| ParamSymbol* const paramSymbol(it2.getValue(nullptr)); | ParamSymbol* const paramSymbol(it2.getValue(nullptr)); | ||||
| CARLA_SAFE_ASSERT_CONTINUE(paramSymbol != nullptr); | CARLA_SAFE_ASSERT_CONTINUE(paramSymbol != nullptr); | ||||
| @@ -796,7 +796,7 @@ void CarlaPlugin::loadStateSave(const CarlaStateSave& stateSave) | |||||
| // --------------------------------------------------------------- | // --------------------------------------------------------------- | ||||
| // Part 4c - clear | // Part 4c - clear | ||||
| for (LinkedList<ParamSymbol*>::Itenerator it = paramSymbols.begin(); it.valid(); it.next()) | |||||
| for (LinkedList<ParamSymbol*>::Itenerator it = paramSymbols.begin2(); it.valid(); it.next()) | |||||
| { | { | ||||
| ParamSymbol* const paramSymbol(it.getValue(nullptr)); | ParamSymbol* const paramSymbol(it.getValue(nullptr)); | ||||
| delete paramSymbol; | delete paramSymbol; | ||||
| @@ -807,7 +807,7 @@ void CarlaPlugin::loadStateSave(const CarlaStateSave& stateSave) | |||||
| // --------------------------------------------------------------- | // --------------------------------------------------------------- | ||||
| // Part 5 - set custom data | // Part 5 - set custom data | ||||
| for (CarlaStateSave::CustomDataItenerator it = stateSave.customData.begin(); it.valid(); it.next()) | |||||
| for (CarlaStateSave::CustomDataItenerator it = stateSave.customData.begin2(); it.valid(); it.next()) | |||||
| { | { | ||||
| const CarlaStateSave::CustomData* const stateCustomData(it.getValue(nullptr)); | const CarlaStateSave::CustomData* const stateCustomData(it.getValue(nullptr)); | ||||
| CARLA_SAFE_ASSERT_CONTINUE(stateCustomData != nullptr); | CARLA_SAFE_ASSERT_CONTINUE(stateCustomData != nullptr); | ||||
| @@ -1267,7 +1267,7 @@ void CarlaPlugin::setCustomData(const char* const type, const char* const key, c | |||||
| } | } | ||||
| // Check if we already have this key | // Check if we already have this key | ||||
| for (LinkedList<CustomData>::Itenerator it = pData->custom.begin(); it.valid(); it.next()) | |||||
| for (LinkedList<CustomData>::Itenerator it = pData->custom.begin2(); it.valid(); it.next()) | |||||
| { | { | ||||
| CustomData& customData(it.getValue(kCustomDataFallbackNC)); | CustomData& customData(it.getValue(kCustomDataFallbackNC)); | ||||
| CARLA_SAFE_ASSERT_CONTINUE(customData.isValid()); | CARLA_SAFE_ASSERT_CONTINUE(customData.isValid()); | ||||
| @@ -1432,7 +1432,7 @@ void CarlaPlugin::idle() | |||||
| const CarlaMutexLocker sl(pData->postRtEvents.mutex); | const CarlaMutexLocker sl(pData->postRtEvents.mutex); | ||||
| for (RtLinkedList<PluginPostRtEvent>::Itenerator it = pData->postRtEvents.data.begin(); it.valid(); it.next()) | |||||
| for (RtLinkedList<PluginPostRtEvent>::Itenerator it = pData->postRtEvents.data.begin2(); it.valid(); it.next()) | |||||
| { | { | ||||
| const PluginPostRtEvent& event(it.getValue(kPluginPostRtEventFallback)); | const PluginPostRtEvent& event(it.getValue(kPluginPostRtEventFallback)); | ||||
| CARLA_SAFE_ASSERT_CONTINUE(event.type != kPluginPostRtEventNull); | CARLA_SAFE_ASSERT_CONTINUE(event.type != kPluginPostRtEventNull); | ||||
| @@ -1830,7 +1830,7 @@ void CarlaPlugin::uiIdle() | |||||
| const CarlaMutexLocker sl(pData->postUiEvents.mutex); | const CarlaMutexLocker sl(pData->postUiEvents.mutex); | ||||
| for (LinkedList<PluginPostRtEvent>::Itenerator it = pData->postUiEvents.data.begin(); it.valid(); it.next()) | |||||
| for (LinkedList<PluginPostRtEvent>::Itenerator it = pData->postUiEvents.data.begin2(); it.valid(); it.next()) | |||||
| { | { | ||||
| const PluginPostRtEvent& event(it.getValue(kPluginPostRtEventFallback)); | const PluginPostRtEvent& event(it.getValue(kPluginPostRtEventFallback)); | ||||
| CARLA_SAFE_ASSERT_CONTINUE(event.type != kPluginPostRtEventNull); | CARLA_SAFE_ASSERT_CONTINUE(event.type != kPluginPostRtEventNull); | ||||
| @@ -1434,7 +1434,7 @@ public: | |||||
| if (pData->extNotes.mutex.tryLock()) | if (pData->extNotes.mutex.tryLock()) | ||||
| { | { | ||||
| for (RtLinkedList<ExternalMidiNote>::Itenerator it = pData->extNotes.data.begin(); it.valid(); it.next()) | |||||
| for (RtLinkedList<ExternalMidiNote>::Itenerator it = pData->extNotes.data.begin2(); it.valid(); it.next()) | |||||
| { | { | ||||
| const ExternalMidiNote& note(it.getValue()); | const ExternalMidiNote& note(it.getValue()); | ||||
| @@ -60,6 +60,7 @@ using juce::StringArray; | |||||
| CARLA_BACKEND_START_NAMESPACE | CARLA_BACKEND_START_NAMESPACE | ||||
| #if 0 | |||||
| // ------------------------------------------------------------------- | // ------------------------------------------------------------------- | ||||
| // Fallback data | // Fallback data | ||||
| @@ -2093,7 +2094,7 @@ public: | |||||
| if (fDescriptor->cleanup == nullptr) | if (fDescriptor->cleanup == nullptr) | ||||
| { | { | ||||
| for (LinkedList<LADSPA_Handle>::Itenerator it = fHandles.begin(); it.valid(); it.next()) | |||||
| for (LinkedList<LADSPA_Handle>::Itenerator it = fHandles.begin2(); it.valid(); it.next()) | |||||
| { | { | ||||
| LADSPA_Handle const handle(it.getValue(nullptr)); | LADSPA_Handle const handle(it.getValue(nullptr)); | ||||
| CARLA_SAFE_ASSERT_CONTINUE(handle != nullptr); | CARLA_SAFE_ASSERT_CONTINUE(handle != nullptr); | ||||
| @@ -2137,7 +2138,7 @@ public: | |||||
| } | } | ||||
| else | else | ||||
| { | { | ||||
| for (LinkedList<LADSPA_Handle>::Itenerator it = fHandles.begin(); it.valid(); it.next()) | |||||
| for (LinkedList<LADSPA_Handle>::Itenerator it = fHandles.begin2(); it.valid(); it.next()) | |||||
| { | { | ||||
| LADSPA_Handle const handle(it.getValue(nullptr)); | LADSPA_Handle const handle(it.getValue(nullptr)); | ||||
| CARLA_SAFE_ASSERT_CONTINUE(handle != nullptr); | CARLA_SAFE_ASSERT_CONTINUE(handle != nullptr); | ||||
| @@ -2169,7 +2170,7 @@ public: | |||||
| } | } | ||||
| else | else | ||||
| { | { | ||||
| for (LinkedList<LADSPA_Handle>::Itenerator it = fHandles.begin(); it.valid(); it.next()) | |||||
| for (LinkedList<LADSPA_Handle>::Itenerator it = fHandles.begin2(); it.valid(); it.next()) | |||||
| { | { | ||||
| LADSPA_Handle const handle(it.getValue(nullptr)); | LADSPA_Handle const handle(it.getValue(nullptr)); | ||||
| CARLA_SAFE_ASSERT_CONTINUE(handle != nullptr); | CARLA_SAFE_ASSERT_CONTINUE(handle != nullptr); | ||||
| @@ -2402,7 +2403,7 @@ public: | |||||
| osc_send_sample_rate(fOscData, static_cast<float>(pData->engine->getSampleRate())); | osc_send_sample_rate(fOscData, static_cast<float>(pData->engine->getSampleRate())); | ||||
| for (LinkedList<CustomData>::Itenerator it = pData->custom.begin(); it.valid(); it.next()) | |||||
| for (LinkedList<CustomData>::Itenerator it = pData->custom.begin2(); it.valid(); it.next()) | |||||
| { | { | ||||
| const CustomData& customData(it.getValue(kCustomDataFallback)); | const CustomData& customData(it.getValue(kCustomDataFallback)); | ||||
| CARLA_SAFE_ASSERT_CONTINUE(customData.isValid()); | CARLA_SAFE_ASSERT_CONTINUE(customData.isValid()); | ||||
| @@ -2887,7 +2888,7 @@ private: | |||||
| dlabel = carla_strdup(label); | dlabel = carla_strdup(label); | ||||
| } catch(...) { return false; } | } catch(...) { return false; } | ||||
| for (LinkedList<const char*>::Itenerator it = sMultiSynthList.begin(); it.valid(); it.next()) | |||||
| for (LinkedList<const char*>::Itenerator it = sMultiSynthList.begin2(); it.valid(); it.next()) | |||||
| { | { | ||||
| const char* const itLabel(it.getValue()); | const char* const itLabel(it.getValue()); | ||||
| @@ -2905,7 +2906,7 @@ private: | |||||
| { | { | ||||
| CARLA_SAFE_ASSERT_RETURN(label != nullptr && label[0] != '\0',); | CARLA_SAFE_ASSERT_RETURN(label != nullptr && label[0] != '\0',); | ||||
| for (LinkedList<const char*>::Itenerator it = sMultiSynthList.begin(); it.valid(); it.next()) | |||||
| for (LinkedList<const char*>::Itenerator it = sMultiSynthList.begin2(); it.valid(); it.next()) | |||||
| { | { | ||||
| const char* const itLabel(it.getValue()); | const char* const itLabel(it.getValue()); | ||||
| @@ -2924,14 +2925,19 @@ private: | |||||
| }; | }; | ||||
| LinkedList<const char*> CarlaPluginDSSI::sMultiSynthList; | LinkedList<const char*> CarlaPluginDSSI::sMultiSynthList; | ||||
| #endif | |||||
| // ------------------------------------------------------------------------------------------------------------------- | // ------------------------------------------------------------------------------------------------------------------- | ||||
| CarlaPlugin* CarlaPlugin::newDSSI(const Initializer& init) | CarlaPlugin* CarlaPlugin::newDSSI(const Initializer& init) | ||||
| { | { | ||||
| carla_debug("CarlaPlugin::newDSSI({%p, \"%s\", \"%s\", \"%s\", " P_INT64 ", %x})", | carla_debug("CarlaPlugin::newDSSI({%p, \"%s\", \"%s\", \"%s\", " P_INT64 ", %x})", | ||||
| init.engine, init.filename, init.name, init.label, init.uniqueId, init.optons); | |||||
| init.engine, init.filename, init.name, init.label, init.uniqueId, init.options); | |||||
| init.engine->setLastError("TODO"); | |||||
| return nullptr; | |||||
| #if 0 | |||||
| CarlaPluginDSSI* const plugin(new CarlaPluginDSSI(init.engine, init.id)); | CarlaPluginDSSI* const plugin(new CarlaPluginDSSI(init.engine, init.id)); | ||||
| if (! plugin->init(init.filename, init.name, init.label, init.options)) | if (! plugin->init(init.filename, init.name, init.label, init.options)) | ||||
| @@ -2941,6 +2947,7 @@ CarlaPlugin* CarlaPlugin::newDSSI(const Initializer& init) | |||||
| } | } | ||||
| return plugin; | return plugin; | ||||
| #endif | |||||
| } | } | ||||
| // ------------------------------------------------------------------------------------------------------------------- | // ------------------------------------------------------------------------------------------------------------------- | ||||
| @@ -1054,7 +1054,7 @@ public: | |||||
| if (pData->extNotes.mutex.tryLock()) | if (pData->extNotes.mutex.tryLock()) | ||||
| { | { | ||||
| for (RtLinkedList<ExternalMidiNote>::Itenerator it = pData->extNotes.data.begin(); it.valid(); it.next()) | |||||
| for (RtLinkedList<ExternalMidiNote>::Itenerator it = pData->extNotes.data.begin2(); it.valid(); it.next()) | |||||
| { | { | ||||
| const ExternalMidiNote& note(it.getValue()); | const ExternalMidiNote& note(it.getValue()); | ||||
| @@ -628,7 +628,7 @@ CarlaPlugin::ProtectedData::~ProtectedData() noexcept | |||||
| iconName = nullptr; | iconName = nullptr; | ||||
| } | } | ||||
| for (LinkedList<CustomData>::Itenerator it = custom.begin(); it.valid(); it.next()) | |||||
| for (LinkedList<CustomData>::Itenerator it = custom.begin2(); it.valid(); it.next()) | |||||
| { | { | ||||
| CustomData& customData(it.getValue(kCustomDataFallbackNC)); | CustomData& customData(it.getValue(kCustomDataFallbackNC)); | ||||
| //CARLA_SAFE_ASSERT_CONTINUE(customData.isValid()); | //CARLA_SAFE_ASSERT_CONTINUE(customData.isValid()); | ||||
| @@ -709,7 +709,7 @@ public: | |||||
| if (pData->extNotes.mutex.tryLock()) | if (pData->extNotes.mutex.tryLock()) | ||||
| { | { | ||||
| for (RtLinkedList<ExternalMidiNote>::Itenerator it = pData->extNotes.data.begin(); it.valid(); it.next()) | |||||
| for (RtLinkedList<ExternalMidiNote>::Itenerator it = pData->extNotes.data.begin2(); it.valid(); it.next()) | |||||
| { | { | ||||
| const ExternalMidiNote& note(it.getValue()); | const ExternalMidiNote& note(it.getValue()); | ||||
| @@ -68,7 +68,7 @@ public: | |||||
| { | { | ||||
| if (fDescriptor->cleanup != nullptr) | if (fDescriptor->cleanup != nullptr) | ||||
| { | { | ||||
| for (LinkedList<LADSPA_Handle>::Itenerator it = fHandles.begin(); it.valid(); it.next()) | |||||
| for (LinkedList<LADSPA_Handle>::Itenerator it = fHandles.begin2(); it.valid(); it.next()) | |||||
| { | { | ||||
| LADSPA_Handle const handle(it.getValue(nullptr)); | LADSPA_Handle const handle(it.getValue(nullptr)); | ||||
| CARLA_SAFE_ASSERT_CONTINUE(handle != nullptr); | CARLA_SAFE_ASSERT_CONTINUE(handle != nullptr); | ||||
| @@ -713,7 +713,7 @@ public: | |||||
| // Start parameters in their default values | // Start parameters in their default values | ||||
| fParamBuffers[j] = def; | fParamBuffers[j] = def; | ||||
| for (LinkedList<LADSPA_Handle>::Itenerator it = fHandles.begin(); it.valid(); it.next()) | |||||
| for (LinkedList<LADSPA_Handle>::Itenerator it = fHandles.begin2(); it.valid(); it.next()) | |||||
| { | { | ||||
| LADSPA_Handle const handle(it.getValue(nullptr)); | LADSPA_Handle const handle(it.getValue(nullptr)); | ||||
| CARLA_SAFE_ASSERT_CONTINUE(handle != nullptr); | CARLA_SAFE_ASSERT_CONTINUE(handle != nullptr); | ||||
| @@ -728,7 +728,7 @@ public: | |||||
| // Not Audio or Control | // Not Audio or Control | ||||
| carla_stderr2("ERROR - Got a broken Port (neither Audio or Control)"); | carla_stderr2("ERROR - Got a broken Port (neither Audio or Control)"); | ||||
| for (LinkedList<LADSPA_Handle>::Itenerator it = fHandles.begin(); it.valid(); it.next()) | |||||
| for (LinkedList<LADSPA_Handle>::Itenerator it = fHandles.begin2(); it.valid(); it.next()) | |||||
| { | { | ||||
| LADSPA_Handle const handle(it.getValue(nullptr)); | LADSPA_Handle const handle(it.getValue(nullptr)); | ||||
| CARLA_SAFE_ASSERT_CONTINUE(handle != nullptr); | CARLA_SAFE_ASSERT_CONTINUE(handle != nullptr); | ||||
| @@ -879,7 +879,7 @@ public: | |||||
| if (fDescriptor->activate != nullptr) | if (fDescriptor->activate != nullptr) | ||||
| { | { | ||||
| for (LinkedList<LADSPA_Handle>::Itenerator it = fHandles.begin(); it.valid(); it.next()) | |||||
| for (LinkedList<LADSPA_Handle>::Itenerator it = fHandles.begin2(); it.valid(); it.next()) | |||||
| { | { | ||||
| LADSPA_Handle const handle(it.getValue(nullptr)); | LADSPA_Handle const handle(it.getValue(nullptr)); | ||||
| CARLA_SAFE_ASSERT_CONTINUE(handle != nullptr); | CARLA_SAFE_ASSERT_CONTINUE(handle != nullptr); | ||||
| @@ -897,7 +897,7 @@ public: | |||||
| if (fDescriptor->deactivate != nullptr) | if (fDescriptor->deactivate != nullptr) | ||||
| { | { | ||||
| for (LinkedList<LADSPA_Handle>::Itenerator it = fHandles.begin(); it.valid(); it.next()) | |||||
| for (LinkedList<LADSPA_Handle>::Itenerator it = fHandles.begin2(); it.valid(); it.next()) | |||||
| { | { | ||||
| LADSPA_Handle const handle(it.getValue(nullptr)); | LADSPA_Handle const handle(it.getValue(nullptr)); | ||||
| CARLA_SAFE_ASSERT_CONTINUE(handle != nullptr); | CARLA_SAFE_ASSERT_CONTINUE(handle != nullptr); | ||||
| @@ -1171,7 +1171,7 @@ public: | |||||
| // Run plugin | // Run plugin | ||||
| uint instn = 0; | uint instn = 0; | ||||
| for (LinkedList<LADSPA_Handle>::Itenerator it = fHandles.begin(); it.valid(); it.next(), ++instn) | |||||
| for (LinkedList<LADSPA_Handle>::Itenerator it = fHandles.begin2(); it.valid(); it.next(), ++instn) | |||||
| { | { | ||||
| LADSPA_Handle const handle(it.getValue(nullptr)); | LADSPA_Handle const handle(it.getValue(nullptr)); | ||||
| CARLA_SAFE_ASSERT_CONTINUE(handle != nullptr); | CARLA_SAFE_ASSERT_CONTINUE(handle != nullptr); | ||||
| @@ -1381,7 +1381,7 @@ public: | |||||
| if (fDescriptor->cleanup == nullptr) | if (fDescriptor->cleanup == nullptr) | ||||
| { | { | ||||
| for (LinkedList<LADSPA_Handle>::Itenerator it = fHandles.begin(); it.valid(); it.next()) | |||||
| for (LinkedList<LADSPA_Handle>::Itenerator it = fHandles.begin2(); it.valid(); it.next()) | |||||
| { | { | ||||
| LADSPA_Handle const handle(it.getValue(nullptr)); | LADSPA_Handle const handle(it.getValue(nullptr)); | ||||
| CARLA_SAFE_ASSERT_CONTINUE(handle != nullptr); | CARLA_SAFE_ASSERT_CONTINUE(handle != nullptr); | ||||
| @@ -1425,7 +1425,7 @@ public: | |||||
| } | } | ||||
| else | else | ||||
| { | { | ||||
| for (LinkedList<LADSPA_Handle>::Itenerator it = fHandles.begin(); it.valid(); it.next()) | |||||
| for (LinkedList<LADSPA_Handle>::Itenerator it = fHandles.begin2(); it.valid(); it.next()) | |||||
| { | { | ||||
| LADSPA_Handle const handle(it.getValue(nullptr)); | LADSPA_Handle const handle(it.getValue(nullptr)); | ||||
| CARLA_SAFE_ASSERT_CONTINUE(handle != nullptr); | CARLA_SAFE_ASSERT_CONTINUE(handle != nullptr); | ||||
| @@ -1457,7 +1457,7 @@ public: | |||||
| } | } | ||||
| else | else | ||||
| { | { | ||||
| for (LinkedList<LADSPA_Handle>::Itenerator it = fHandles.begin(); it.valid(); it.next()) | |||||
| for (LinkedList<LADSPA_Handle>::Itenerator it = fHandles.begin2(); it.valid(); it.next()) | |||||
| { | { | ||||
| LADSPA_Handle const handle(it.getValue(nullptr)); | LADSPA_Handle const handle(it.getValue(nullptr)); | ||||
| CARLA_SAFE_ASSERT_CONTINUE(handle != nullptr); | CARLA_SAFE_ASSERT_CONTINUE(handle != nullptr); | ||||
| @@ -684,7 +684,7 @@ public: | |||||
| } | } | ||||
| } | } | ||||
| for (LinkedList<const char*>::Itenerator it = fCustomURIDs.begin(); it.valid(); it.next()) | |||||
| for (LinkedList<const char*>::Itenerator it = fCustomURIDs.begin2(); it.valid(); it.next()) | |||||
| { | { | ||||
| const char* const uri(it.getValue()); | const char* const uri(it.getValue()); | ||||
| @@ -2962,7 +2962,7 @@ public: | |||||
| { | { | ||||
| const uint32_t j = fEventsIn.ctrlIndex; | const uint32_t j = fEventsIn.ctrlIndex; | ||||
| for (RtLinkedList<ExternalMidiNote>::Itenerator it = pData->extNotes.data.begin(); it.valid(); it.next()) | |||||
| for (RtLinkedList<ExternalMidiNote>::Itenerator it = pData->extNotes.data.begin2(); it.valid(); it.next()) | |||||
| { | { | ||||
| const ExternalMidiNote& note(it.getValue()); | const ExternalMidiNote& note(it.getValue()); | ||||
| @@ -4353,7 +4353,7 @@ public: | |||||
| CARLA_SAFE_ASSERT_RETURN(stype != nullptr, LV2_STATE_ERR_BAD_TYPE); | CARLA_SAFE_ASSERT_RETURN(stype != nullptr, LV2_STATE_ERR_BAD_TYPE); | ||||
| // Check if we already have this key | // Check if we already have this key | ||||
| for (LinkedList<CustomData>::Itenerator it = pData->custom.begin(); it.valid(); it.next()) | |||||
| for (LinkedList<CustomData>::Itenerator it = pData->custom.begin2(); it.valid(); it.next()) | |||||
| { | { | ||||
| CustomData& data(it.getValue()); | CustomData& data(it.getValue()); | ||||
| @@ -4402,7 +4402,7 @@ public: | |||||
| const char* stype = nullptr; | const char* stype = nullptr; | ||||
| const char* stringData = nullptr; | const char* stringData = nullptr; | ||||
| for (LinkedList<CustomData>::Itenerator it = pData->custom.begin(); it.valid(); it.next()) | |||||
| for (LinkedList<CustomData>::Itenerator it = pData->custom.begin2(); it.valid(); it.next()) | |||||
| { | { | ||||
| const CustomData& data(it.getValue()); | const CustomData& data(it.getValue()); | ||||
| @@ -821,7 +821,7 @@ public: | |||||
| if (pData->extNotes.mutex.tryLock()) | if (pData->extNotes.mutex.tryLock()) | ||||
| { | { | ||||
| for (RtLinkedList<ExternalMidiNote>::Itenerator it = pData->extNotes.data.begin(); it.valid(); it.next()) | |||||
| for (RtLinkedList<ExternalMidiNote>::Itenerator it = pData->extNotes.data.begin2(); it.valid(); it.next()) | |||||
| { | { | ||||
| const ExternalMidiNote& note(it.getValue()); | const ExternalMidiNote& note(it.getValue()); | ||||
| @@ -749,7 +749,7 @@ public: | |||||
| if (fDescriptor->ui_set_custom_data != nullptr) | if (fDescriptor->ui_set_custom_data != nullptr) | ||||
| { | { | ||||
| for (LinkedList<CustomData>::Itenerator it = pData->custom.begin(); it.valid(); it.next()) | |||||
| for (LinkedList<CustomData>::Itenerator it = pData->custom.begin2(); it.valid(); it.next()) | |||||
| { | { | ||||
| const CustomData& cData(it.getValue()); | const CustomData& cData(it.getValue()); | ||||
| @@ -2299,7 +2299,7 @@ public: | |||||
| sPluginInitializer.initIfNeeded(); | sPluginInitializer.initIfNeeded(); | ||||
| for (LinkedList<const NativePluginDescriptor*>::Itenerator it = gPluginDescriptors.begin(); it.valid(); it.next()) | |||||
| for (LinkedList<const NativePluginDescriptor*>::Itenerator it = gPluginDescriptors.begin2(); it.valid(); it.next()) | |||||
| { | { | ||||
| fDescriptor = it.getValue(); | fDescriptor = it.getValue(); | ||||
| @@ -361,7 +361,7 @@ public: | |||||
| } | } | ||||
| } | } | ||||
| for (LinkedList<const char*>::Itenerator it = fCustomURIDs.begin(); it.valid(); it.next()) | |||||
| for (LinkedList<const char*>::Itenerator it = fCustomURIDs.begin2(); it.valid(); it.next()) | |||||
| { | { | ||||
| const char* const uri(it.getValue(nullptr)); | const char* const uri(it.getValue(nullptr)); | ||||
| @@ -1214,7 +1214,7 @@ static void do_vst_check(lib_t& libHandle, const bool doInit) | |||||
| uniqueIds.append(gVstCurrentUniqueId); | uniqueIds.append(gVstCurrentUniqueId); | ||||
| } | } | ||||
| for (LinkedList<intptr_t>::Itenerator it = uniqueIds.begin(); it.valid(); it.next()) | |||||
| for (LinkedList<intptr_t>::Itenerator it = uniqueIds.begin2(); it.valid(); it.next()) | |||||
| { | { | ||||
| gVstCurrentUniqueId = it.getValue(0); | gVstCurrentUniqueId = it.getValue(0); | ||||
| @@ -186,7 +186,7 @@ public: | |||||
| { | { | ||||
| const CarlaMutexLocker sl(fMutex); | const CarlaMutexLocker sl(fMutex); | ||||
| for (LinkedList<const RawMidiEvent*>::Itenerator it = fData.begin(); it.valid(); it.next()) | |||||
| for (LinkedList<const RawMidiEvent*>::Itenerator it = fData.begin2(); it.valid(); it.next()) | |||||
| { | { | ||||
| const RawMidiEvent* const rawMidiEvent(it.getValue(nullptr)); | const RawMidiEvent* const rawMidiEvent(it.getValue(nullptr)); | ||||
| CARLA_SAFE_ASSERT_CONTINUE(rawMidiEvent != nullptr); | CARLA_SAFE_ASSERT_CONTINUE(rawMidiEvent != nullptr); | ||||
| @@ -214,7 +214,7 @@ public: | |||||
| { | { | ||||
| const CarlaMutexLocker sl(fMutex); | const CarlaMutexLocker sl(fMutex); | ||||
| for (LinkedList<const RawMidiEvent*>::Itenerator it = fData.begin(); it.valid(); it.next()) | |||||
| for (LinkedList<const RawMidiEvent*>::Itenerator it = fData.begin2(); it.valid(); it.next()) | |||||
| delete it.getValue(nullptr); | delete it.getValue(nullptr); | ||||
| fData.clear(); | fData.clear(); | ||||
| @@ -236,7 +236,7 @@ public: | |||||
| if (fStartTime != 0) | if (fStartTime != 0) | ||||
| timePosFrame += static_cast<long double>(fStartTime); | timePosFrame += static_cast<long double>(fStartTime); | ||||
| for (LinkedList<const RawMidiEvent*>::Itenerator it = fData.begin(); it.valid(); it.next()) | |||||
| for (LinkedList<const RawMidiEvent*>::Itenerator it = fData.begin2(); it.valid(); it.next()) | |||||
| { | { | ||||
| const RawMidiEvent* const rawMidiEvent(it.getValue(nullptr)); | const RawMidiEvent* const rawMidiEvent(it.getValue(nullptr)); | ||||
| CARLA_SAFE_ASSERT_CONTINUE(rawMidiEvent != nullptr); | CARLA_SAFE_ASSERT_CONTINUE(rawMidiEvent != nullptr); | ||||
| @@ -275,7 +275,7 @@ public: | |||||
| LinkedList<const RawMidiEvent*>::Itenerator iteneratorBegin() const noexcept | LinkedList<const RawMidiEvent*>::Itenerator iteneratorBegin() const noexcept | ||||
| { | { | ||||
| return fData.begin(); | |||||
| return fData.begin2(); | |||||
| } | } | ||||
| // ------------------------------------------------------------------- | // ------------------------------------------------------------------- | ||||
| @@ -298,7 +298,7 @@ public: | |||||
| char* dataWrtn = data; | char* dataWrtn = data; | ||||
| int wrtn; | int wrtn; | ||||
| for (LinkedList<const RawMidiEvent*>::Itenerator it = fData.begin(); it.valid(); it.next()) | |||||
| for (LinkedList<const RawMidiEvent*>::Itenerator it = fData.begin2(); it.valid(); it.next()) | |||||
| { | { | ||||
| const RawMidiEvent* const rawMidiEvent(it.getValue(nullptr)); | const RawMidiEvent* const rawMidiEvent(it.getValue(nullptr)); | ||||
| CARLA_SAFE_ASSERT_CONTINUE(rawMidiEvent != nullptr); | CARLA_SAFE_ASSERT_CONTINUE(rawMidiEvent != nullptr); | ||||
| @@ -435,7 +435,7 @@ private: | |||||
| return; | return; | ||||
| } | } | ||||
| for (LinkedList<const RawMidiEvent*>::Itenerator it = fData.begin(); it.valid(); it.next()) | |||||
| for (LinkedList<const RawMidiEvent*>::Itenerator it = fData.begin2(); it.valid(); it.next()) | |||||
| { | { | ||||
| const RawMidiEvent* const oldEvent(it.getValue(nullptr)); | const RawMidiEvent* const oldEvent(it.getValue(nullptr)); | ||||
| CARLA_SAFE_ASSERT_CONTINUE(oldEvent != nullptr); | CARLA_SAFE_ASSERT_CONTINUE(oldEvent != nullptr); | ||||
| @@ -52,7 +52,7 @@ public: | |||||
| if (! fInitiated) | if (! fInitiated) | ||||
| return; | return; | ||||
| for (LinkedList<const ProgramInfo*>::Itenerator it = fPrograms.begin(); it.valid(); it.next()) | |||||
| for (LinkedList<const ProgramInfo*>::Itenerator it = fPrograms.begin2(); it.valid(); it.next()) | |||||
| { | { | ||||
| const ProgramInfo* const& pInfo(it.getValue(nullptr)); | const ProgramInfo* const& pInfo(it.getValue(nullptr)); | ||||
| delete pInfo; | delete pInfo; | ||||
| @@ -118,7 +118,7 @@ public: | |||||
| const char* getZynProgramFilename(const uint32_t bank, const uint32_t program) const noexcept | const char* getZynProgramFilename(const uint32_t bank, const uint32_t program) const noexcept | ||||
| { | { | ||||
| for (LinkedList<const ProgramInfo*>::Itenerator it = fPrograms.begin(); it.valid(); it.next()) | |||||
| for (LinkedList<const ProgramInfo*>::Itenerator it = fPrograms.begin2(); it.valid(); it.next()) | |||||
| { | { | ||||
| const ProgramInfo* const& pInfo(it.getValue(nullptr)); | const ProgramInfo* const& pInfo(it.getValue(nullptr)); | ||||
| @@ -86,7 +86,7 @@ struct PluginListManager { | |||||
| ~PluginListManager() | ~PluginListManager() | ||||
| { | { | ||||
| #ifdef CARLA_NATIVE_PLUGIN_DSSI | #ifdef CARLA_NATIVE_PLUGIN_DSSI | ||||
| for (LinkedList<const DSSI_Descriptor*>::Itenerator it = dssiDescs.begin(); it.valid(); it.next()) | |||||
| for (LinkedList<const DSSI_Descriptor*>::Itenerator it = dssiDescs.begin2(); it.valid(); it.next()) | |||||
| { | { | ||||
| const DSSI_Descriptor* const dssiDesc(it.getValue()); | const DSSI_Descriptor* const dssiDesc(it.getValue()); | ||||
| //delete[] lv2Desc->URI; | //delete[] lv2Desc->URI; | ||||
| @@ -96,7 +96,7 @@ struct PluginListManager { | |||||
| #endif | #endif | ||||
| #ifdef CARLA_NATIVE_PLUGIN_LV2 | #ifdef CARLA_NATIVE_PLUGIN_LV2 | ||||
| for (LinkedList<const LV2_Descriptor*>::Itenerator it = lv2Descs.begin(); it.valid(); it.next()) | |||||
| for (LinkedList<const LV2_Descriptor*>::Itenerator it = lv2Descs.begin2(); it.valid(); it.next()) | |||||
| { | { | ||||
| const LV2_Descriptor* const lv2Desc(it.getValue()); | const LV2_Descriptor* const lv2Desc(it.getValue()); | ||||
| delete[] lv2Desc->URI; | delete[] lv2Desc->URI; | ||||
| @@ -115,7 +115,7 @@ static void writeManifestFile(PluginListManager& plm) | |||||
| // ------------------------------------------------------------------- | // ------------------------------------------------------------------- | ||||
| // Plugins | // Plugins | ||||
| for (LinkedList<const NativePluginDescriptor*>::Itenerator it = plm.descs.begin(); it.valid(); it.next()) | |||||
| for (LinkedList<const NativePluginDescriptor*>::Itenerator it = plm.descs.begin2(); it.valid(); it.next()) | |||||
| { | { | ||||
| const NativePluginDescriptor* const& pluginDesc(it.getValue()); | const NativePluginDescriptor* const& pluginDesc(it.getValue()); | ||||
| const String label(pluginDesc->label); | const String label(pluginDesc->label); | ||||
| @@ -576,7 +576,7 @@ int main() | |||||
| writeManifestFile(plm); | writeManifestFile(plm); | ||||
| for (LinkedList<const NativePluginDescriptor*>::Itenerator it = plm.descs.begin(); it.valid(); it.next()) | |||||
| for (LinkedList<const NativePluginDescriptor*>::Itenerator it = plm.descs.begin2(); it.valid(); it.next()) | |||||
| { | { | ||||
| const NativePluginDescriptor* const& pluginDesc(it.getValue()); | const NativePluginDescriptor* const& pluginDesc(it.getValue()); | ||||
| writePluginFile(pluginDesc); | writePluginFile(pluginDesc); | ||||
| @@ -1410,7 +1410,7 @@ static LV2_Handle lv2_instantiate(const LV2_Descriptor* lv2Descriptor, double sa | |||||
| PluginListManager& plm(PluginListManager::getInstance()); | PluginListManager& plm(PluginListManager::getInstance()); | ||||
| for (LinkedList<const NativePluginDescriptor*>::Itenerator it = plm.descs.begin(); it.valid(); it.next()) | |||||
| for (LinkedList<const NativePluginDescriptor*>::Itenerator it = plm.descs.begin2(); it.valid(); it.next()) | |||||
| { | { | ||||
| const NativePluginDescriptor* const& tmpDesc(it.getValue()); | const NativePluginDescriptor* const& tmpDesc(it.getValue()); | ||||
| @@ -715,7 +715,7 @@ static intptr_t vst_dispatcherCallback(AEffect* effect, int32_t opcode, int32_t | |||||
| PluginListManager& plm(PluginListManager::getInstance()); | PluginListManager& plm(PluginListManager::getInstance()); | ||||
| for (LinkedList<const NativePluginDescriptor*>::Itenerator it = plm.descs.begin(); it.valid(); it.next()) | |||||
| for (LinkedList<const NativePluginDescriptor*>::Itenerator it = plm.descs.begin2(); it.valid(); it.next()) | |||||
| { | { | ||||
| const NativePluginDescriptor* const& tmpDesc(it.getValue()); | const NativePluginDescriptor* const& tmpDesc(it.getValue()); | ||||
| @@ -135,24 +135,25 @@ int main() | |||||
| postRtEvents.trySplice(); | postRtEvents.trySplice(); | ||||
| assert(postRtEvents.data.count() == 4); | assert(postRtEvents.data.count() == 4); | ||||
| assert(postRtEvents.dataPendingRT.count() == 0); | assert(postRtEvents.dataPendingRT.count() == 0); | ||||
| // return 0; | |||||
| for (RtLinkedList<MyData>::Itenerator it = postRtEvents.data.begin(); it.valid(); it.next()) | |||||
| for (RtLinkedList<MyData>::Itenerator it = postRtEvents.data.begin2(); it.valid(); it.next()) | |||||
| { | { | ||||
| static const MyData fallback = { { '\0' }, 11 }; | |||||
| const MyData& my(it.getValue(fallback)); | |||||
| const MyData& my(it.getValue()); | |||||
| carla_stdout("FOR DATA!!!: %i %s", my.id, my.str); | carla_stdout("FOR DATA!!!: %i %s", my.id, my.str); | ||||
| if (my.id == 1) | |||||
| if (my.id == 2) | |||||
| { | { | ||||
| // +1 append at | |||||
| // +1 append | |||||
| postRtEvents.dataPendingRT.insertAt(m5, it); | postRtEvents.dataPendingRT.insertAt(m5, it); | ||||
| assert(postRtEvents.data.count() == 4); | assert(postRtEvents.data.count() == 4); | ||||
| assert(postRtEvents.dataPendingRT.count() == 1); | assert(postRtEvents.dataPendingRT.count() == 1); | ||||
| } | } | ||||
| } | } | ||||
| for (const MyData& my : postRtEvents.data) | |||||
| carla_stdout("FOR DATA!!! NEW AUTO Itenerator!!!: %i %s", my.id, my.str); | |||||
| postRtEvents.trySplice(); | postRtEvents.trySplice(); | ||||
| assert(postRtEvents.data.count() == 5); | assert(postRtEvents.data.count() == 5); | ||||
| assert(postRtEvents.dataPendingRT.count() == 0); | assert(postRtEvents.dataPendingRT.count() == 0); | ||||
| @@ -34,7 +34,7 @@ public: | |||||
| ~LibCounter() noexcept | ~LibCounter() noexcept | ||||
| { | { | ||||
| // might have some leftovers | // might have some leftovers | ||||
| for (LinkedList<Lib>::Itenerator it = fLibs.begin(); it.valid(); it.next()) | |||||
| for (LinkedList<Lib>::Itenerator it = fLibs.begin2(); it.valid(); it.next()) | |||||
| { | { | ||||
| static Lib libFallback = { nullptr, nullptr, 0, false }; | static Lib libFallback = { nullptr, nullptr, 0, false }; | ||||
| @@ -73,7 +73,7 @@ public: | |||||
| const CarlaMutexLocker cml(fMutex); | const CarlaMutexLocker cml(fMutex); | ||||
| for (LinkedList<Lib>::Itenerator it = fLibs.begin(); it.valid(); it.next()) | |||||
| for (LinkedList<Lib>::Itenerator it = fLibs.begin2(); it.valid(); it.next()) | |||||
| { | { | ||||
| static Lib libFallback = { nullptr, nullptr, 0, false }; | static Lib libFallback = { nullptr, nullptr, 0, false }; | ||||
| @@ -118,7 +118,7 @@ public: | |||||
| const CarlaMutexLocker cml(fMutex); | const CarlaMutexLocker cml(fMutex); | ||||
| for (LinkedList<Lib>::Itenerator it = fLibs.begin(); it.valid(); it.next()) | |||||
| for (LinkedList<Lib>::Itenerator it = fLibs.begin2(); it.valid(); it.next()) | |||||
| { | { | ||||
| static Lib libFallback = { nullptr, nullptr, 0, false }; | static Lib libFallback = { nullptr, nullptr, 0, false }; | ||||
| @@ -24,7 +24,7 @@ uint PatchbayGroupList::getGroupId(const char* const groupName) const noexcept | |||||
| { | { | ||||
| CARLA_SAFE_ASSERT_RETURN(groupName != nullptr && groupName[0] != '\0', 0); | CARLA_SAFE_ASSERT_RETURN(groupName != nullptr && groupName[0] != '\0', 0); | ||||
| for (LinkedList<GroupNameToId>::Itenerator it = list.begin(); it.valid(); it.next()) | |||||
| for (LinkedList<GroupNameToId>::Itenerator it = list.begin2(); it.valid(); it.next()) | |||||
| { | { | ||||
| const GroupNameToId& groupNameToId(it.getValue(kGroupNameToIdFallback)); | const GroupNameToId& groupNameToId(it.getValue(kGroupNameToIdFallback)); | ||||
| CARLA_SAFE_ASSERT_CONTINUE(groupNameToId.group != 0); | CARLA_SAFE_ASSERT_CONTINUE(groupNameToId.group != 0); | ||||
| @@ -40,7 +40,7 @@ const char* PatchbayGroupList::getGroupName(const uint groupId) const noexcept | |||||
| { | { | ||||
| static const char fallback[] = { '\0' }; | static const char fallback[] = { '\0' }; | ||||
| for (LinkedList<GroupNameToId>::Itenerator it = list.begin(); it.valid(); it.next()) | |||||
| for (LinkedList<GroupNameToId>::Itenerator it = list.begin2(); it.valid(); it.next()) | |||||
| { | { | ||||
| const GroupNameToId& groupNameToId(it.getValue(kGroupNameToIdFallback)); | const GroupNameToId& groupNameToId(it.getValue(kGroupNameToIdFallback)); | ||||
| CARLA_SAFE_ASSERT_CONTINUE(groupNameToId.group != 0); | CARLA_SAFE_ASSERT_CONTINUE(groupNameToId.group != 0); | ||||
| @@ -56,7 +56,7 @@ const char* PatchbayPortList::getFullPortName(const uint groupId, const uint por | |||||
| { | { | ||||
| static const char fallback[] = { '\0' }; | static const char fallback[] = { '\0' }; | ||||
| for (LinkedList<PortNameToId>::Itenerator it = list.begin(); it.valid(); it.next()) | |||||
| for (LinkedList<PortNameToId>::Itenerator it = list.begin2(); it.valid(); it.next()) | |||||
| { | { | ||||
| const PortNameToId& portNameToId(it.getValue(kPortNameToIdFallback)); | const PortNameToId& portNameToId(it.getValue(kPortNameToIdFallback)); | ||||
| CARLA_SAFE_ASSERT_CONTINUE(portNameToId.group != 0); | CARLA_SAFE_ASSERT_CONTINUE(portNameToId.group != 0); | ||||
| @@ -72,7 +72,7 @@ const PortNameToId& PatchbayPortList::getPortNameToId(const char* const fullPort | |||||
| { | { | ||||
| CARLA_SAFE_ASSERT_RETURN(fullPortName != nullptr && fullPortName[0] != '\0', kPortNameToIdFallback); | CARLA_SAFE_ASSERT_RETURN(fullPortName != nullptr && fullPortName[0] != '\0', kPortNameToIdFallback); | ||||
| for (LinkedList<PortNameToId>::Itenerator it = list.begin(); it.valid(); it.next()) | |||||
| for (LinkedList<PortNameToId>::Itenerator it = list.begin2(); it.valid(); it.next()) | |||||
| { | { | ||||
| const PortNameToId& portNameToId(it.getValue(kPortNameToIdFallback)); | const PortNameToId& portNameToId(it.getValue(kPortNameToIdFallback)); | ||||
| CARLA_SAFE_ASSERT_CONTINUE(portNameToId.group != 0); | CARLA_SAFE_ASSERT_CONTINUE(portNameToId.group != 0); | ||||
| @@ -258,13 +258,13 @@ void CarlaStateSave::clear() noexcept | |||||
| currentMidiBank = -1; | currentMidiBank = -1; | ||||
| currentMidiProgram = -1; | currentMidiProgram = -1; | ||||
| for (ParameterItenerator it = parameters.begin(); it.valid(); it.next()) | |||||
| for (ParameterItenerator it = parameters.begin2(); it.valid(); it.next()) | |||||
| { | { | ||||
| Parameter* const stateParameter(it.getValue(nullptr)); | Parameter* const stateParameter(it.getValue(nullptr)); | ||||
| delete stateParameter; | delete stateParameter; | ||||
| } | } | ||||
| for (CustomDataItenerator it = customData.begin(); it.valid(); it.next()) | |||||
| for (CustomDataItenerator it = customData.begin2(); it.valid(); it.next()) | |||||
| { | { | ||||
| CustomData* const stateCustomData(it.getValue(nullptr)); | CustomData* const stateCustomData(it.getValue(nullptr)); | ||||
| delete stateCustomData; | delete stateCustomData; | ||||
| @@ -574,7 +574,7 @@ void CarlaStateSave::dumpToMemoryStream(MemoryOutputStream& content) const | |||||
| } | } | ||||
| #endif | #endif | ||||
| for (ParameterItenerator it = parameters.begin(); it.valid(); it.next()) | |||||
| for (ParameterItenerator it = parameters.begin2(); it.valid(); it.next()) | |||||
| { | { | ||||
| Parameter* const stateParameter(it.getValue(nullptr)); | Parameter* const stateParameter(it.getValue(nullptr)); | ||||
| CARLA_SAFE_ASSERT_CONTINUE(stateParameter != nullptr); | CARLA_SAFE_ASSERT_CONTINUE(stateParameter != nullptr); | ||||
| @@ -631,7 +631,7 @@ void CarlaStateSave::dumpToMemoryStream(MemoryOutputStream& content) const | |||||
| content << midiProgramXml; | content << midiProgramXml; | ||||
| } | } | ||||
| for (CustomDataItenerator it = customData.begin(); it.valid(); it.next()) | |||||
| for (CustomDataItenerator it = customData.begin2(); it.valid(); it.next()) | |||||
| { | { | ||||
| CustomData* const stateCustomData(it.getValue(nullptr)); | CustomData* const stateCustomData(it.getValue(nullptr)); | ||||
| CARLA_SAFE_ASSERT_CONTINUE(stateCustomData != nullptr); | CARLA_SAFE_ASSERT_CONTINUE(stateCustomData != nullptr); | ||||
| @@ -134,7 +134,7 @@ protected: | |||||
| tmpList[count] = nullptr; | tmpList[count] = nullptr; | ||||
| std::size_t i=0; | std::size_t i=0; | ||||
| for (LinkedList<const char*>::Itenerator it = list.begin(); it.valid(); it.next(), ++i) | |||||
| for (LinkedList<const char*>::Itenerator it = list.begin2(); it.valid(); it.next(), ++i) | |||||
| { | { | ||||
| tmpList[i] = carla_strdup_safe(it.getValue(nullptr)); | tmpList[i] = carla_strdup_safe(it.getValue(nullptr)); | ||||
| CARLA_SAFE_ASSERT_BREAK(tmpList[i] != nullptr); | CARLA_SAFE_ASSERT_BREAK(tmpList[i] != nullptr); | ||||
| @@ -162,7 +162,7 @@ public: | |||||
| CarlaStringList(const CarlaStringList& list) noexcept | CarlaStringList(const CarlaStringList& list) noexcept | ||||
| : LinkedList<const char*>() | : LinkedList<const char*>() | ||||
| { | { | ||||
| for (Itenerator it = list.begin(); it.valid(); it.next()) | |||||
| for (Itenerator it = list.begin2(); it.valid(); it.next()) | |||||
| LinkedList<const char*>::append(carla_strdup_safe(it.getValue(nullptr))); | LinkedList<const char*>::append(carla_strdup_safe(it.getValue(nullptr))); | ||||
| } | } | ||||
| @@ -175,7 +175,7 @@ public: | |||||
| void clear() noexcept | void clear() noexcept | ||||
| { | { | ||||
| for (Itenerator it = begin(); it.valid(); it.next()) | |||||
| for (Itenerator it = begin2(); it.valid(); it.next()) | |||||
| { | { | ||||
| if (const char* const string = it.getValue(nullptr)) | if (const char* const string = it.getValue(nullptr)) | ||||
| delete[] string; | delete[] string; | ||||
| @@ -256,7 +256,7 @@ public: | |||||
| { | { | ||||
| CARLA_SAFE_ASSERT_RETURN(string != nullptr, false); | CARLA_SAFE_ASSERT_RETURN(string != nullptr, false); | ||||
| for (Itenerator it = begin(); it.valid(); it.next()) | |||||
| for (Itenerator it = begin2(); it.valid(); it.next()) | |||||
| { | { | ||||
| const char* const stringComp(it.getValue(nullptr)); | const char* const stringComp(it.getValue(nullptr)); | ||||
| CARLA_SAFE_ASSERT_CONTINUE(stringComp != nullptr); | CARLA_SAFE_ASSERT_CONTINUE(stringComp != nullptr); | ||||
| @@ -276,7 +276,7 @@ public: | |||||
| { | { | ||||
| CARLA_SAFE_ASSERT_RETURN(string != nullptr,); | CARLA_SAFE_ASSERT_RETURN(string != nullptr,); | ||||
| for (Itenerator it = begin(); it.valid(); it.next()) | |||||
| for (Itenerator it = begin2(); it.valid(); it.next()) | |||||
| { | { | ||||
| const char* const stringComp(it.getValue(nullptr)); | const char* const stringComp(it.getValue(nullptr)); | ||||
| CARLA_SAFE_ASSERT_CONTINUE(stringComp != nullptr); | CARLA_SAFE_ASSERT_CONTINUE(stringComp != nullptr); | ||||
| @@ -315,7 +315,7 @@ public: | |||||
| { | { | ||||
| clear(); | clear(); | ||||
| for (Itenerator it = list.begin(); it.valid(); it.next()) | |||||
| for (Itenerator it = list.begin2(); it.valid(); it.next()) | |||||
| { | { | ||||
| if (const char* const string = carla_strdup_safe(it.getValue(nullptr))) | if (const char* const string = carla_strdup_safe(it.getValue(nullptr))) | ||||
| LinkedList<const char*>::append(string); | LinkedList<const char*>::append(string); | ||||
| @@ -141,7 +141,11 @@ public: | |||||
| // TODO: remove this, fallback should be mandatory | // TODO: remove this, fallback should be mandatory | ||||
| T& getValue() const noexcept | T& getValue() const noexcept | ||||
| { | { | ||||
| static T& fallback(_getFallback()); | |||||
| Data* const data(list_entry(fEntry, Data, siblings)); | Data* const data(list_entry(fEntry, Data, siblings)); | ||||
| CARLA_SAFE_ASSERT_RETURN(data != nullptr, fallback); | |||||
| return data->value; | return data->value; | ||||
| } | } | ||||
| @@ -151,10 +155,82 @@ public: | |||||
| const ListHead& kQueue; | const ListHead& kQueue; | ||||
| bool* const fUsingItenerator; | bool* const fUsingItenerator; | ||||
| static T& _getFallback() | |||||
| { | |||||
| static T data; | |||||
| carla_zeroStruct<T>(data); | |||||
| return data; | |||||
| } | |||||
| friend class AbstractLinkedList; | friend class AbstractLinkedList; | ||||
| }; | }; | ||||
| Itenerator begin() const noexcept | |||||
| class AutoItenerator { | |||||
| public: | |||||
| AutoItenerator(const ListHead* entry, bool* usingItenerator) noexcept | |||||
| : fEntry(entry), | |||||
| fEntry2(entry != nullptr ? entry->next : nullptr), | |||||
| fUsingItenerator(usingItenerator) | |||||
| { | |||||
| CARLA_SAFE_ASSERT(fEntry != nullptr); | |||||
| CARLA_SAFE_ASSERT(fEntry2 != nullptr); | |||||
| } | |||||
| ~AutoItenerator() noexcept | |||||
| { | |||||
| if (fUsingItenerator != nullptr) | |||||
| *fUsingItenerator = false; | |||||
| } | |||||
| bool operator!=(AutoItenerator& it) const noexcept | |||||
| { | |||||
| CARLA_SAFE_ASSERT_RETURN(fEntry != nullptr, false); | |||||
| CARLA_SAFE_ASSERT_RETURN(it.fEntry != nullptr, false); | |||||
| return fEntry != it.fEntry; | |||||
| } | |||||
| AutoItenerator& operator++() noexcept | |||||
| { | |||||
| fEntry = fEntry2; | |||||
| fEntry2 = (fEntry != nullptr) ? fEntry->next : nullptr; | |||||
| return *this; | |||||
| } | |||||
| T& operator*() noexcept | |||||
| { | |||||
| static T& fallback(_getFallback()); | |||||
| Data* const data(list_entry(fEntry, Data, siblings)); | |||||
| CARLA_SAFE_ASSERT_RETURN(data != nullptr, fallback); | |||||
| return data->value; | |||||
| } | |||||
| const T& operator*() const noexcept | |||||
| { | |||||
| static const T& fallback(_getFallback()); | |||||
| const Data* const data(list_entry_const(fEntry, Data, siblings)); | |||||
| CARLA_SAFE_ASSERT_RETURN(data != nullptr, fallback); | |||||
| return data->value; | |||||
| } | |||||
| private: | |||||
| ListHead* fEntry; | |||||
| ListHead* fEntry2; | |||||
| bool* const fUsingItenerator; | |||||
| static T& _getFallback() | |||||
| { | |||||
| static T data; | |||||
| carla_zeroStruct<T>(data); | |||||
| return data; | |||||
| } | |||||
| }; | |||||
| Itenerator begin2() const noexcept | |||||
| { | { | ||||
| static const ListHead fallback = { nullptr, nullptr }; | static const ListHead fallback = { nullptr, nullptr }; | ||||
| CARLA_SAFE_ASSERT_RETURN(! fUsingItenerator, Itenerator(fallback, nullptr)); | CARLA_SAFE_ASSERT_RETURN(! fUsingItenerator, Itenerator(fallback, nullptr)); | ||||
| @@ -163,6 +239,19 @@ public: | |||||
| return Itenerator(fQueue, &fUsingItenerator); | return Itenerator(fQueue, &fUsingItenerator); | ||||
| } | } | ||||
| AutoItenerator begin() const noexcept | |||||
| { | |||||
| CARLA_SAFE_ASSERT_RETURN(! fUsingItenerator, AutoItenerator(nullptr, nullptr)); | |||||
| fUsingItenerator = true; | |||||
| return AutoItenerator(fQueue.next, &fUsingItenerator); | |||||
| } | |||||
| AutoItenerator end() const noexcept | |||||
| { | |||||
| return AutoItenerator(&fQueue, nullptr); | |||||
| } | |||||
| void clear() noexcept | void clear() noexcept | ||||
| { | { | ||||
| if (fCount == 0) | if (fCount == 0) | ||||
| @@ -260,11 +349,11 @@ public: | |||||
| return fallback; | return fallback; | ||||
| } | } | ||||
| const T& getFirst(const T& fallback) const noexcept | |||||
| T getFirst(T& fallback, const bool removeObj) noexcept | |||||
| { | { | ||||
| CARLA_SAFE_ASSERT_RETURN(fCount > 0, fallback); | CARLA_SAFE_ASSERT_RETURN(fCount > 0, fallback); | ||||
| return _get(fQueue.next, fallback); | |||||
| return _get(fQueue.next, fallback, removeObj); | |||||
| } | } | ||||
| T& getFirst(T& fallback) const noexcept | T& getFirst(T& fallback) const noexcept | ||||
| @@ -274,18 +363,18 @@ public: | |||||
| return _get(fQueue.next, fallback); | return _get(fQueue.next, fallback); | ||||
| } | } | ||||
| T getFirst(T& fallback, const bool removeObj) noexcept | |||||
| const T& getFirst(const T& fallback) const noexcept | |||||
| { | { | ||||
| CARLA_SAFE_ASSERT_RETURN(fCount > 0, fallback); | CARLA_SAFE_ASSERT_RETURN(fCount > 0, fallback); | ||||
| return _get(fQueue.next, fallback, removeObj); | |||||
| return _get(fQueue.next, fallback); | |||||
| } | } | ||||
| const T& getLast(const T& fallback) const noexcept | |||||
| T getLast(T& fallback, const bool removeObj) noexcept | |||||
| { | { | ||||
| CARLA_SAFE_ASSERT_RETURN(fCount > 0, fallback); | CARLA_SAFE_ASSERT_RETURN(fCount > 0, fallback); | ||||
| return _get(fQueue.prev, fallback); | |||||
| return _get(fQueue.prev, fallback, removeObj); | |||||
| } | } | ||||
| T& getLast(T& fallback) const noexcept | T& getLast(T& fallback) const noexcept | ||||
| @@ -295,11 +384,11 @@ public: | |||||
| return _get(fQueue.prev, fallback); | return _get(fQueue.prev, fallback); | ||||
| } | } | ||||
| T getLast(T& fallback, const bool removeObj) noexcept | |||||
| const T& getLast(const T& fallback) const noexcept | |||||
| { | { | ||||
| CARLA_SAFE_ASSERT_RETURN(fCount > 0, fallback); | CARLA_SAFE_ASSERT_RETURN(fCount > 0, fallback); | ||||
| return _get(fQueue.prev, fallback, removeObj); | |||||
| return _get(fQueue.prev, fallback); | |||||
| } | } | ||||
| void remove(Itenerator& it) noexcept | void remove(Itenerator& it) noexcept | ||||
| @@ -127,7 +127,7 @@ public: | |||||
| bool moveTo(RtLinkedList<T>& list, const bool inTail) noexcept | bool moveTo(RtLinkedList<T>& list, const bool inTail) noexcept | ||||
| { | { | ||||
| CARLA_SAFE_ASSERT_RETURN(fMemPool == list.fMemPool,); | |||||
| CARLA_SAFE_ASSERT_RETURN(fMemPool == list.fMemPool, false); | |||||
| return AbstractLinkedList<T>::moveTo(list, inTail); | return AbstractLinkedList<T>::moveTo(list, inTail); | ||||
| } | } | ||||