--- linuxsampler/trunk/src/network/lscpserver.cpp 2006/02/08 20:28:46 836 +++ linuxsampler/trunk/src/network/lscpserver.cpp 2006/03/04 16:23:53 841 @@ -564,7 +564,9 @@ */ String LSCPServer::AddChannel() { dmsg(2,("LSCPServer: AddChannel()\n")); + LockRTNotify(); SamplerChannel* pSamplerChannel = pSampler->AddSamplerChannel(); + UnlockRTNotify(); LSCPResultSet result(pSamplerChannel->Index()); return result.Produce(); } @@ -606,6 +608,7 @@ String LSCPServer::GetEngineInfo(String EngineName) { dmsg(2,("LSCPServer: GetEngineInfo(EngineName=%s)\n", EngineName.c_str())); LSCPResultSet result; + LockRTNotify(); try { Engine* pEngine = EngineFactory::Create(EngineName); result.Add("DESCRIPTION", pEngine->Description()); @@ -615,6 +618,7 @@ catch (LinuxSamplerException e) { result.Error(e); } + UnlockRTNotify(); return result.Produce(); } @@ -1245,6 +1249,7 @@ String LSCPServer::SetAudioOutputDevice(uint AudioDeviceId, uint uiSamplerChannel) { dmsg(2,("LSCPServer: SetAudiotOutputDevice(AudioDeviceId=%d, SamplerChannel=%d)\n",AudioDeviceId,uiSamplerChannel)); LSCPResultSet result; + LockRTNotify(); try { SamplerChannel* pSamplerChannel = pSampler->GetSamplerChannel(uiSamplerChannel); if (!pSamplerChannel) throw LinuxSamplerException("Invalid sampler channel number " + ToString(uiSamplerChannel)); @@ -1256,12 +1261,14 @@ catch (LinuxSamplerException e) { result.Error(e); } + UnlockRTNotify(); return result.Produce(); } String LSCPServer::SetAudioOutputType(String AudioOutputDriver, uint uiSamplerChannel) { dmsg(2,("LSCPServer: SetAudioOutputType(String AudioOutputDriver=%s, SamplerChannel=%d)\n",AudioOutputDriver.c_str(),uiSamplerChannel)); LSCPResultSet result; + LockRTNotify(); try { SamplerChannel* pSamplerChannel = pSampler->GetSamplerChannel(uiSamplerChannel); if (!pSamplerChannel) throw LinuxSamplerException("Invalid sampler channel number " + ToString(uiSamplerChannel)); @@ -1293,6 +1300,7 @@ catch (LinuxSamplerException e) { result.Error(e); } + UnlockRTNotify(); return result.Produce(); }