--- linuxsampler/trunk/src/network/lscpserver.cpp 2005/06/16 21:35:30 659 +++ linuxsampler/trunk/src/network/lscpserver.cpp 2005/06/17 19:49:30 660 @@ -33,6 +33,7 @@ #endif #include "../engines/EngineFactory.h" +#include "../engines/EngineChannelFactory.h" #include "../drivers/audio/AudioOutputDeviceFactory.h" #include "../drivers/midi/MidiInputDeviceFactory.h" @@ -190,6 +191,18 @@ } } + // check if some engine channel's parameter / status changed, if so notify the respective LSCP event subscribers + { + std::set engineChannels = EngineChannelFactory::EngineChannelInstances(); + std::set::iterator itEngineChannel = engineChannels.begin(); + std::set::iterator itEnd = engineChannels.end(); + for (; itEngineChannel != itEnd; ++itEngineChannel) { + if ((*itEngineChannel)->StatusChanged()) { + SendLSCPNotify(LSCPEvent(LSCPEvent::event_channel_info, (*itEngineChannel)->iSamplerChannelIndex)); + } + } + } + //Now let's deliver late notifies (if any) NotifyBufferMutex.Lock(); for (std::map::iterator iterNotify = bufferedNotifies.begin(); iterNotify != bufferedNotifies.end(); iterNotify++) { @@ -578,7 +591,7 @@ Engine* pEngine = EngineFactory::Create(EngineName); result.Add("DESCRIPTION", pEngine->Description()); result.Add("VERSION", pEngine->Version()); - delete pEngine; + EngineFactory::Destroy(pEngine); } catch (LinuxSamplerException e) { result.Error(e);