/[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 1713 by persson, Thu Mar 6 20:42:22 2008 UTC revision 1761 by iliev, Fri Aug 29 15:42:06 2008 UTC
# Line 424  int LSCPServer::Main() { Line 424  int LSCPServer::Main() {
424              std::set<EngineChannel*>::iterator itEnd           = engineChannels.end();              std::set<EngineChannel*>::iterator itEnd           = engineChannels.end();
425              for (; itEngineChannel != itEnd; ++itEngineChannel) {              for (; itEngineChannel != itEnd; ++itEngineChannel) {
426                  if ((*itEngineChannel)->StatusChanged()) {                  if ((*itEngineChannel)->StatusChanged()) {
427                      SendLSCPNotify(LSCPEvent(LSCPEvent::event_channel_info, (*itEngineChannel)->iSamplerChannelIndex));                      SendLSCPNotify(LSCPEvent(LSCPEvent::event_channel_info, (*itEngineChannel)->GetSamplerChannel()->Index()));
428                  }                  }
429    
430                  for (int i = 0; i < (*itEngineChannel)->GetFxSendCount(); i++) {                  for (int i = 0; i < (*itEngineChannel)->GetFxSendCount(); i++) {
431                      FxSend* fxs = (*itEngineChannel)->GetFxSend(i);                      FxSend* fxs = (*itEngineChannel)->GetFxSend(i);
432                      if(fxs != NULL && fxs->IsInfoChanged()) {                      if(fxs != NULL && fxs->IsInfoChanged()) {
433                          int chn = (*itEngineChannel)->iSamplerChannelIndex;                          int chn = (*itEngineChannel)->GetSamplerChannel()->Index();
434                          LSCPServer::SendLSCPNotify(LSCPEvent(LSCPEvent::event_fx_send_info, chn, fxs->Id()));                          LSCPServer::SendLSCPNotify(LSCPEvent(LSCPEvent::event_fx_send_info, chn, fxs->Id()));
435                          fxs->SetInfoChanged(false);                          fxs->SetInfoChanged(false);
436                      }                      }
# Line 2557  String LSCPServer::SetGlobalVolume(doubl Line 2557  String LSCPServer::SetGlobalVolume(doubl
2557      LSCPResultSet result;      LSCPResultSet result;
2558      try {      try {
2559          if (dVolume < 0) throw Exception("Volume may not be negative");          if (dVolume < 0) throw Exception("Volume may not be negative");
2560          GLOBAL_VOLUME = dVolume; // see common/global.cpp          GLOBAL_VOLUME = dVolume; // see common/global_private.cpp
2561          LSCPServer::SendLSCPNotify(LSCPEvent(LSCPEvent::event_global_info, "VOLUME", GLOBAL_VOLUME));          LSCPServer::SendLSCPNotify(LSCPEvent(LSCPEvent::event_global_info, "VOLUME", GLOBAL_VOLUME));
2562      } catch (Exception e) {      } catch (Exception e) {
2563          result.Error(e);          result.Error(e);
# Line 3098  String LSCPServer::SetDbInstrumentDescri Line 3098  String LSCPServer::SetDbInstrumentDescri
3098      } catch (Exception e) {      } catch (Exception e) {
3099           result.Error(e);           result.Error(e);
3100      }      }
3101    #else
3102        result.Error(String(DOESNT_HAVE_SQLITE3), 0);
3103    #endif
3104        return result.Produce();
3105    }
3106    
3107    String LSCPServer::SetDbInstrumentFilePath(String OldPath, String NewPath) {
3108        dmsg(2,("LSCPServer: SetDbInstrumentFilePath(OldPath=%s,NewPath=%s)\n", OldPath.c_str(), NewPath.c_str()));
3109        LSCPResultSet result;
3110    #if HAVE_SQLITE3
3111        try {
3112            InstrumentsDb::GetInstrumentsDb()->SetInstrumentFilePath(OldPath, NewPath);
3113        } catch (Exception e) {
3114             result.Error(e);
3115        }
3116    #else
3117        result.Error(String(DOESNT_HAVE_SQLITE3), 0);
3118    #endif
3119        return result.Produce();
3120    }
3121    
3122    String LSCPServer::FindLostDbInstrumentFiles() {
3123        dmsg(2,("LSCPServer: FindLostDbInstrumentFiles()\n"));
3124        LSCPResultSet result;
3125    #if HAVE_SQLITE3
3126        try {
3127            String list;
3128            StringListPtr pLostFiles = InstrumentsDb::GetInstrumentsDb()->FindLostInstrumentFiles();
3129    
3130            for (int i = 0; i < pLostFiles->size(); i++) {
3131                if (list != "") list += ",";
3132                list += "'" + pLostFiles->at(i) + "'";
3133            }
3134    
3135            result.Add(list);
3136        } catch (Exception e) {
3137             result.Error(e);
3138        }
3139  #else  #else
3140      result.Error(String(DOESNT_HAVE_SQLITE3), 0);      result.Error(String(DOESNT_HAVE_SQLITE3), 0);
3141  #endif  #endif

Legend:
Removed from v.1713  
changed lines
  Added in v.1761

  ViewVC Help
Powered by ViewVC