2 |
* * |
* * |
3 |
* LinuxSampler - modular, streaming capable sampler * |
* LinuxSampler - modular, streaming capable sampler * |
4 |
* * |
* * |
5 |
* Copyright (C) 2003 by Benno Senoner and Christian Schoenebeck * |
* Copyright (C) 2003, 2004 by Benno Senoner and Christian Schoenebeck * |
6 |
* * |
* * |
7 |
* This program is free software; you can redistribute it and/or modify * |
* This program is free software; you can redistribute it and/or modify * |
8 |
* it under the terms of the GNU General Public License as published by * |
* it under the terms of the GNU General Public License as published by * |
57 |
LSCPServer(Sampler* pSampler); |
LSCPServer(Sampler* pSampler); |
58 |
|
|
59 |
// Methods called by the parser |
// Methods called by the parser |
60 |
String LoadInstrument(String Filename, uint uiInstrument, uint uiSamplerChannel); |
String DestroyAudioOutputDevice(uint DeviceIndex); |
61 |
|
String LoadInstrument(String Filename, uint uiInstrument, uint uiSamplerChannel, bool bBackground = false); |
62 |
String LoadEngine(String EngineName, uint uiSamplerChannel); |
String LoadEngine(String EngineName, uint uiSamplerChannel); |
63 |
String GetChannels(); |
String GetChannels(); |
64 |
String AddChannel(); |
String AddChannel(); |
69 |
String GetVoiceCount(uint uiSamplerChannel); |
String GetVoiceCount(uint uiSamplerChannel); |
70 |
String GetStreamCount(uint uiSamplerChannel); |
String GetStreamCount(uint uiSamplerChannel); |
71 |
String GetBufferFill(fill_response_t ResponseType, uint uiSamplerChannel); |
String GetBufferFill(fill_response_t ResponseType, uint uiSamplerChannel); |
72 |
String SetAudioOutputType(audio_output_type_t AudioOutputType, uint uiSamplerChannel); |
String GetAvailableAudioOutputDrivers(); |
73 |
String SetAudioOutputChannel(uint AudioOutputChannel, uint uiSamplerChannel); |
String GetAudioOutputDriverInfo(String Driver); |
74 |
String SetMIDIInputType(midi_input_type_t MidiInputType, uint uiSamplerChannel); |
#ifdef __GNUC__ |
75 |
|
typedef std::map<String,String> StringMap; // nasty workaround for a GCC bug (see GCC bug #15980, #57) |
76 |
|
String GetAudioOutputDriverParameterInfo(String Driver, String Parameter, std::map<String,String> DependencyList = StringMap()); |
77 |
|
String CreateAudioOutputDevice(String Driver, std::map<String,String> Parameters = StringMap()); |
78 |
|
#else |
79 |
|
String GetAudioOutputDriverParameterInfo(String Driver, String Parameter, std::map<String,String> DependencyList = std::map<String,String>()); |
80 |
|
String CreateAudioOutputDevice(String Driver, std::map<String,String> Parameters = std::map<String,String>()); |
81 |
|
#endif // __GNUC__ |
82 |
|
String GetAudioOutputDeviceCount(); |
83 |
|
String GetAudioOutputDevices(); |
84 |
|
String GetAudioOutputDeviceInfo(uint DeviceIndex); |
85 |
|
String GetAudioOutputChannelInfo(uint DeviceId, uint ChannelId); |
86 |
|
String GetAudioOutputChannelParameterInfo(uint DeviceId, uint ChannelId, String ParameterName); |
87 |
|
String SetAudioOutputChannelParameter(uint DeviceId, uint ChannelId, String ParamKey, String ParamVal); |
88 |
|
String SetAudioOutputDeviceParameter(uint DeviceIndex, String ParamKey, String ParamVal); |
89 |
|
String SetAudioOutputChannel(uint ChannelAudioOutputChannel, uint AudioOutputDeviceInputChannel, uint uiSamplerChannel); |
90 |
|
String SetMIDIInputType(String MidiInputDriver, uint uiSamplerChannel); |
91 |
String SetMIDIInputPort(String MIDIInputPort, uint uiSamplerchannel); |
String SetMIDIInputPort(String MIDIInputPort, uint uiSamplerchannel); |
92 |
String SetMIDIInputChannel(uint MIDIChannel, uint uiSamplerChannel); |
String SetMIDIInputChannel(uint MIDIChannel, uint uiSamplerChannel); |
93 |
|
String SetAudioOutputDevice(uint AudioDeviceId, uint SamplerChannel); |
94 |
String SetVolume(double Volume, uint uiSamplerChannel); |
String SetVolume(double Volume, uint uiSamplerChannel); |
95 |
String ResetChannel(uint uiSamplerChannel); |
String ResetChannel(uint uiSamplerChannel); |
96 |
String SubscribeNotification(uint UDPPort); |
String SubscribeNotification(event_t Event); |
97 |
String UnsubscribeNotification(String SessionID); |
String UnsubscribeNotification(event_t Event); |
98 |
void AnswerClient(String ReturnMessage); |
void AnswerClient(String ReturnMessage); |
99 |
protected: |
protected: |
100 |
int hSocket; |
int hSocket; |
131 |
} |
} |
132 |
}; |
}; |
133 |
|
|
134 |
|
|
135 |
|
/** |
136 |
|
* Instrument loader thread for the LinuxSampler Control Protocol (LSCP). |
137 |
|
*/ |
138 |
|
class LSCPLoadInstrument : public Thread { |
139 |
|
|
140 |
|
public: |
141 |
|
LSCPLoadInstrument(Engine* pEngine, String Filename, uint uiInstrument); |
142 |
|
|
143 |
|
protected: |
144 |
|
// Instance variables. |
145 |
|
Engine* pEngine; |
146 |
|
String Filename; |
147 |
|
uint uiInstrument; |
148 |
|
|
149 |
|
// Implementation of virtual method from class Thread. |
150 |
|
int Main(); |
151 |
|
}; |
152 |
|
|
153 |
#endif // __LSCPSERVER_H_ |
#endif // __LSCPSERVER_H_ |