/[svn]/linuxsampler/trunk/src/network/lscpserver.cpp
ViewVC logotype

Diff of /linuxsampler/trunk/src/network/lscpserver.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 836 by persson, Wed Feb 8 20:28:46 2006 UTC revision 841 by persson, Sat Mar 4 16:23:53 2006 UTC
# Line 564  String LSCPServer::ListChannels() { Line 564  String LSCPServer::ListChannels() {
564   */   */
565  String LSCPServer::AddChannel() {  String LSCPServer::AddChannel() {
566      dmsg(2,("LSCPServer: AddChannel()\n"));      dmsg(2,("LSCPServer: AddChannel()\n"));
567        LockRTNotify();
568      SamplerChannel* pSamplerChannel = pSampler->AddSamplerChannel();      SamplerChannel* pSamplerChannel = pSampler->AddSamplerChannel();
569        UnlockRTNotify();
570      LSCPResultSet result(pSamplerChannel->Index());      LSCPResultSet result(pSamplerChannel->Index());
571      return result.Produce();      return result.Produce();
572  }  }
# Line 606  String LSCPServer::ListAvailableEngines( Line 608  String LSCPServer::ListAvailableEngines(
608  String LSCPServer::GetEngineInfo(String EngineName) {  String LSCPServer::GetEngineInfo(String EngineName) {
609      dmsg(2,("LSCPServer: GetEngineInfo(EngineName=%s)\n", EngineName.c_str()));      dmsg(2,("LSCPServer: GetEngineInfo(EngineName=%s)\n", EngineName.c_str()));
610      LSCPResultSet result;      LSCPResultSet result;
611        LockRTNotify();
612      try {      try {
613          Engine* pEngine = EngineFactory::Create(EngineName);          Engine* pEngine = EngineFactory::Create(EngineName);
614          result.Add("DESCRIPTION", pEngine->Description());          result.Add("DESCRIPTION", pEngine->Description());
# Line 615  String LSCPServer::GetEngineInfo(String Line 618  String LSCPServer::GetEngineInfo(String
618      catch (LinuxSamplerException e) {      catch (LinuxSamplerException e) {
619           result.Error(e);           result.Error(e);
620      }      }
621        UnlockRTNotify();
622      return result.Produce();      return result.Produce();
623  }  }
624    
# Line 1245  String LSCPServer::SetAudioOutputChannel Line 1249  String LSCPServer::SetAudioOutputChannel
1249  String LSCPServer::SetAudioOutputDevice(uint AudioDeviceId, uint uiSamplerChannel) {  String LSCPServer::SetAudioOutputDevice(uint AudioDeviceId, uint uiSamplerChannel) {
1250      dmsg(2,("LSCPServer: SetAudiotOutputDevice(AudioDeviceId=%d, SamplerChannel=%d)\n",AudioDeviceId,uiSamplerChannel));      dmsg(2,("LSCPServer: SetAudiotOutputDevice(AudioDeviceId=%d, SamplerChannel=%d)\n",AudioDeviceId,uiSamplerChannel));
1251      LSCPResultSet result;      LSCPResultSet result;
1252        LockRTNotify();
1253      try {      try {
1254          SamplerChannel* pSamplerChannel = pSampler->GetSamplerChannel(uiSamplerChannel);          SamplerChannel* pSamplerChannel = pSampler->GetSamplerChannel(uiSamplerChannel);
1255          if (!pSamplerChannel) throw LinuxSamplerException("Invalid sampler channel number " + ToString(uiSamplerChannel));          if (!pSamplerChannel) throw LinuxSamplerException("Invalid sampler channel number " + ToString(uiSamplerChannel));
# Line 1256  String LSCPServer::SetAudioOutputDevice( Line 1261  String LSCPServer::SetAudioOutputDevice(
1261      catch (LinuxSamplerException e) {      catch (LinuxSamplerException e) {
1262           result.Error(e);           result.Error(e);
1263      }      }
1264        UnlockRTNotify();
1265      return result.Produce();      return result.Produce();
1266  }  }
1267    
1268  String LSCPServer::SetAudioOutputType(String AudioOutputDriver, uint uiSamplerChannel) {  String LSCPServer::SetAudioOutputType(String AudioOutputDriver, uint uiSamplerChannel) {
1269      dmsg(2,("LSCPServer: SetAudioOutputType(String AudioOutputDriver=%s, SamplerChannel=%d)\n",AudioOutputDriver.c_str(),uiSamplerChannel));      dmsg(2,("LSCPServer: SetAudioOutputType(String AudioOutputDriver=%s, SamplerChannel=%d)\n",AudioOutputDriver.c_str(),uiSamplerChannel));
1270      LSCPResultSet result;      LSCPResultSet result;
1271        LockRTNotify();
1272      try {      try {
1273          SamplerChannel* pSamplerChannel = pSampler->GetSamplerChannel(uiSamplerChannel);          SamplerChannel* pSamplerChannel = pSampler->GetSamplerChannel(uiSamplerChannel);
1274          if (!pSamplerChannel) throw LinuxSamplerException("Invalid sampler channel number " + ToString(uiSamplerChannel));          if (!pSamplerChannel) throw LinuxSamplerException("Invalid sampler channel number " + ToString(uiSamplerChannel));
# Line 1293  String LSCPServer::SetAudioOutputType(St Line 1300  String LSCPServer::SetAudioOutputType(St
1300      catch (LinuxSamplerException e) {      catch (LinuxSamplerException e) {
1301           result.Error(e);           result.Error(e);
1302      }      }
1303        UnlockRTNotify();
1304      return result.Produce();      return result.Produce();
1305  }  }
1306    

Legend:
Removed from v.836  
changed lines
  Added in v.841

  ViewVC Help
Powered by ViewVC