/[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 1771 by iliev, Wed Sep 10 15:02:24 2008 UTC revision 1781 by iliev, Mon Sep 29 18:21:21 2008 UTC
# Line 2451  String LSCPServer::SendChannelMidiData(S Line 2451  String LSCPServer::SendChannelMidiData(S
2451          if(pMidiDevice == NULL) throw Exception("Couldn't find virtual MIDI device");          if(pMidiDevice == NULL) throw Exception("Couldn't find virtual MIDI device");
2452    
2453          if (MidiMsg == "NOTE_ON") {          if (MidiMsg == "NOTE_ON") {
2454                pMidiDevice->SendNoteOnToDevice(Arg1, Arg2);
2455              bool b = pMidiDevice->SendNoteOnToSampler(Arg1, Arg2);              bool b = pMidiDevice->SendNoteOnToSampler(Arg1, Arg2);
2456              if (!b) throw Exception("MIDI event failed: " + MidiMsg + " " + ToString(Arg1) + " " + ToString(Arg2));              if (!b) throw Exception("MIDI event failed: " + MidiMsg + " " + ToString(Arg1) + " " + ToString(Arg2));
2457          } else if (MidiMsg == "NOTE_OFF") {          } else if (MidiMsg == "NOTE_OFF") {
2458                pMidiDevice->SendNoteOffToDevice(Arg1, Arg2);
2459              bool b = pMidiDevice->SendNoteOffToSampler(Arg1, Arg2);              bool b = pMidiDevice->SendNoteOffToSampler(Arg1, Arg2);
2460              if (!b) throw Exception("MIDI event failed: " + MidiMsg + " " + ToString(Arg1) + " " + ToString(Arg2));              if (!b) throw Exception("MIDI event failed: " + MidiMsg + " " + ToString(Arg1) + " " + ToString(Arg2));
2461          } else {          } else {
# Line 2690  String LSCPServer::GetFileInstrumentInfo Line 2692  String LSCPServer::GetFileInstrumentInfo
2692                  }                  }
2693                  result.Add("KEY_BINDINGS", ss.str());                  result.Add("KEY_BINDINGS", ss.str());
2694    
2695                    b = false;
2696                  std::stringstream ss2;                  std::stringstream ss2;
2697                  for (int i = 0; i < 128; i++) {                  for (int i = 0; i < 128; i++) {
2698                      if (info.KeySwitchBindings[i]) {                      if (info.KeySwitchBindings[i]) {
# Line 2930  String LSCPServer::AddDbInstruments(Stri Line 2933  String LSCPServer::AddDbInstruments(Stri
2933      return result.Produce();      return result.Produce();
2934  }  }
2935    
2936  String LSCPServer::AddDbInstruments(String ScanMode, String DbDir, String FsDir, bool bBackground) {  String LSCPServer::AddDbInstruments(String ScanMode, String DbDir, String FsDir, bool bBackground, bool insDir) {
2937      dmsg(2,("LSCPServer: AddDbInstruments(ScanMode=%s,DbDir=%s,FsDir=%s,bBackground=%d)\n", ScanMode.c_str(), DbDir.c_str(), FsDir.c_str(), bBackground));      dmsg(2,("LSCPServer: AddDbInstruments(ScanMode=%s,DbDir=%s,FsDir=%s,bBackground=%d,insDir=%d)\n", ScanMode.c_str(), DbDir.c_str(), FsDir.c_str(), bBackground, insDir));
2938      LSCPResultSet result;      LSCPResultSet result;
2939  #if HAVE_SQLITE3  #if HAVE_SQLITE3
2940      try {      try {
2941          int id;          int id;
2942          InstrumentsDb* db = InstrumentsDb::GetInstrumentsDb();          InstrumentsDb* db = InstrumentsDb::GetInstrumentsDb();
2943          if (ScanMode.compare("RECURSIVE") == 0) {          if (ScanMode.compare("RECURSIVE") == 0) {
2944             id = db->AddInstruments(RECURSIVE, DbDir, FsDir, bBackground);              id = db->AddInstruments(RECURSIVE, DbDir, FsDir, bBackground, insDir);
2945          } else if (ScanMode.compare("NON_RECURSIVE") == 0) {          } else if (ScanMode.compare("NON_RECURSIVE") == 0) {
2946             id = db->AddInstruments(NON_RECURSIVE, DbDir, FsDir, bBackground);              id = db->AddInstruments(NON_RECURSIVE, DbDir, FsDir, bBackground, insDir);
2947          } else if (ScanMode.compare("FLAT") == 0) {          } else if (ScanMode.compare("FLAT") == 0) {
2948             id = db->AddInstruments(FLAT, DbDir, FsDir, bBackground);              id = db->AddInstruments(FLAT, DbDir, FsDir, bBackground, insDir);
2949          } else {          } else {
2950              throw Exception("Unknown scan mode: " + ScanMode);              throw Exception("Unknown scan mode: " + ScanMode);
2951          }          }

Legend:
Removed from v.1771  
changed lines
  Added in v.1781

  ViewVC Help
Powered by ViewVC