47 |
#include "../common/Condition.h" |
#include "../common/Condition.h" |
48 |
|
|
49 |
/// TCP Port on which the server should listen for connection requests. |
/// TCP Port on which the server should listen for connection requests. |
50 |
|
#define LSCP_ADDR INADDR_ANY |
51 |
#define LSCP_PORT 8888 |
#define LSCP_PORT 8888 |
52 |
|
|
53 |
/// try up to 3 minutes to bind server socket |
/// try up to 3 minutes to bind server socket |
64 |
*/ |
*/ |
65 |
class LSCPServer : public Thread { |
class LSCPServer : public Thread { |
66 |
public: |
public: |
67 |
LSCPServer(Sampler* pSampler); |
LSCPServer(Sampler* pSampler, long int addr, short int port); |
68 |
|
virtual ~LSCPServer(); |
69 |
int WaitUntilInitialized(long TimeoutSeconds = 0L, long TimeoutNanoSeconds = 0L); |
int WaitUntilInitialized(long TimeoutSeconds = 0L, long TimeoutNanoSeconds = 0L); |
70 |
|
|
71 |
// Methods called by the parser |
// Methods called by the parser |
78 |
String AddChannel(); |
String AddChannel(); |
79 |
String RemoveChannel(uint uiSamplerChannel); |
String RemoveChannel(uint uiSamplerChannel); |
80 |
String GetAvailableEngines(); |
String GetAvailableEngines(); |
81 |
|
String ListAvailableEngines(); |
82 |
String GetEngineInfo(String EngineName); |
String GetEngineInfo(String EngineName); |
83 |
String GetChannelInfo(uint uiSamplerChannel); |
String GetChannelInfo(uint uiSamplerChannel); |
84 |
String GetVoiceCount(uint uiSamplerChannel); |
String GetVoiceCount(uint uiSamplerChannel); |
85 |
String GetStreamCount(uint uiSamplerChannel); |
String GetStreamCount(uint uiSamplerChannel); |
86 |
String GetBufferFill(fill_response_t ResponseType, uint uiSamplerChannel); |
String GetBufferFill(fill_response_t ResponseType, uint uiSamplerChannel); |
87 |
String GetAvailableAudioOutputDrivers(); |
String GetAvailableAudioOutputDrivers(); |
88 |
|
String ListAvailableAudioOutputDrivers(); |
89 |
String GetAvailableMidiInputDrivers(); |
String GetAvailableMidiInputDrivers(); |
90 |
|
String ListAvailableMidiInputDrivers(); |
91 |
String GetAudioOutputDriverInfo(String Driver); |
String GetAudioOutputDriverInfo(String Driver); |
92 |
String GetMidiInputDriverInfo(String Driver); |
String GetMidiInputDriverInfo(String Driver); |
93 |
#ifdef __GNUC__ |
#ifdef __GNUC__ |
125 |
String SetMIDIInputType(String MidiInputDriver, uint uiSamplerChannel); |
String SetMIDIInputType(String MidiInputDriver, uint uiSamplerChannel); |
126 |
String SetMIDIInput(uint MIDIDeviceId, uint MIDIPort, uint MIDIChannel, uint uiSamplerChannel); |
String SetMIDIInput(uint MIDIDeviceId, uint MIDIPort, uint MIDIChannel, uint uiSamplerChannel); |
127 |
String SetVolume(double dVolume, uint uiSamplerChannel); |
String SetVolume(double dVolume, uint uiSamplerChannel); |
128 |
|
String SetChannelMute(bool bMute, uint uiSamplerChannel); |
129 |
|
String SetChannelSolo(bool bSolo, uint uiSamplerChannel); |
130 |
String ResetChannel(uint uiSamplerChannel); |
String ResetChannel(uint uiSamplerChannel); |
131 |
String ResetSampler(); |
String ResetSampler(); |
132 |
|
String GetServerInfo(); |
133 |
String SubscribeNotification(LSCPEvent::event_t); |
String SubscribeNotification(LSCPEvent::event_t); |
134 |
String UnsubscribeNotification(LSCPEvent::event_t); |
String UnsubscribeNotification(LSCPEvent::event_t); |
135 |
String QueryDatabase(String query); |
String QueryDatabase(String query); |
165 |
*/ |
*/ |
166 |
int GetMidiInputDeviceIndex (MidiInputDevice *pDevice); |
int GetMidiInputDeviceIndex (MidiInputDevice *pDevice); |
167 |
|
|
168 |
|
bool HasSoloChannel(); |
169 |
|
void MuteNonSoloChannels(); |
170 |
|
void UnmuteChannels(); |
171 |
|
|
172 |
static std::map<int,String> bufferedNotifies; |
static std::map<int,String> bufferedNotifies; |
173 |
static Mutex NotifyMutex; |
static Mutex NotifyMutex; |
174 |
static Mutex NotifyBufferMutex; |
static Mutex NotifyBufferMutex; |