--- linuxsampler/trunk/src/network/lscpserver.cpp 2006/12/27 16:17:08 1001 +++ linuxsampler/trunk/src/network/lscpserver.cpp 2006/12/29 20:06:14 1005 @@ -24,7 +24,7 @@ #include "lscpserver.h" #include "lscpresultset.h" #include "lscpevent.h" -//#include "../common/global.h" +#include "../common/global.h" #include @@ -2074,6 +2074,23 @@ return result.Produce(); } +String LSCPServer::GetGlobalVolume() { + LSCPResultSet result; + result.Add(ToString(GLOBAL_VOLUME)); // see common/global.cpp + return result.Produce(); +} + +String LSCPServer::SetGlobalVolume(double dVolume) { + LSCPResultSet result; + try { + if (dVolume < 0) throw Exception("Volume may not be negative"); + GLOBAL_VOLUME = dVolume; // see common/global.cpp + } catch (Exception e) { + result.Error(e); + } + return result.Produce(); +} + /** * Will be called by the parser to subscribe a client (frontend) on the * server for receiving event messages.