/[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 1001 by schoenebeck, Wed Dec 27 16:17:08 2006 UTC revision 1007 by schoenebeck, Tue Jan 2 15:37:01 2007 UTC
# Line 24  Line 24 
24  #include "lscpserver.h"  #include "lscpserver.h"
25  #include "lscpresultset.h"  #include "lscpresultset.h"
26  #include "lscpevent.h"  #include "lscpevent.h"
27  //#include "../common/global.h"  #include "../common/global.h"
28    
29  #include <fcntl.h>  #include <fcntl.h>
30    
# Line 1698  String LSCPServer::ListMidiInstrumentMap Line 1698  String LSCPServer::ListMidiInstrumentMap
1698          for (; iter != mappings.end(); iter++) {          for (; iter != mappings.end(); iter++) {
1699              if (s.size()) s += ",";              if (s.size()) s += ",";
1700              s += "{" + ToString(MidiMapID) + ","              s += "{" + ToString(MidiMapID) + ","
1701                       + ToString((int(iter->first.midi_bank_msb) << 7) & int(iter->first.midi_bank_lsb)) + ","                       + ToString((int(iter->first.midi_bank_msb) << 7) | int(iter->first.midi_bank_lsb)) + ","
1702                       + ToString(int(iter->first.midi_prog)) + "}";                       + ToString(int(iter->first.midi_prog)) + "}";
1703          }          }
1704          result.Add(s);          result.Add(s);
# Line 2074  String LSCPServer::GetTotalVoiceCountMax Line 2074  String LSCPServer::GetTotalVoiceCountMax
2074      return result.Produce();      return result.Produce();
2075  }  }
2076    
2077    String LSCPServer::GetGlobalVolume() {
2078        LSCPResultSet result;
2079        result.Add(ToString(GLOBAL_VOLUME)); // see common/global.cpp
2080        return result.Produce();
2081    }
2082    
2083    String LSCPServer::SetGlobalVolume(double dVolume) {
2084        LSCPResultSet result;
2085        try {
2086            if (dVolume < 0) throw Exception("Volume may not be negative");
2087            GLOBAL_VOLUME = dVolume; // see common/global.cpp
2088        } catch (Exception e) {
2089            result.Error(e);
2090        }
2091        return result.Produce();
2092    }
2093    
2094  /**  /**
2095   * Will be called by the parser to subscribe a client (frontend) on the   * Will be called by the parser to subscribe a client (frontend) on the
2096   * server for receiving event messages.   * server for receiving event messages.

Legend:
Removed from v.1001  
changed lines
  Added in v.1007

  ViewVC Help
Powered by ViewVC