28 |
#include <map> |
#include <map> |
29 |
#include "common/global.h" |
#include "common/global.h" |
30 |
#include "common/Exception.h" |
#include "common/Exception.h" |
31 |
#include "engines/common/EngineChannel.h" |
#include "engines/EngineChannel.h" |
32 |
#include "drivers/midi/MidiInputDevice.h" |
#include "drivers/midi/MidiInputDevice.h" |
33 |
#include "drivers/audio/AudioOutputDevice.h" |
#include "drivers/audio/AudioOutputDevice.h" |
34 |
|
|
52 |
* |
* |
53 |
* @param EngineType - type of the engine to use |
* @param EngineType - type of the engine to use |
54 |
* @throws Exception - if \a EngineType is invalid |
* @throws Exception - if \a EngineType is invalid |
55 |
|
* @see Sampler::AvailableEngineTypes() |
56 |
*/ |
*/ |
57 |
void SetEngineType(String EngineType) throw (Exception); |
void SetEngineType(String EngineType) throw (Exception); |
58 |
|
|
178 |
* engine, connected to an arbitrary MIDI input device and connected to |
* engine, connected to an arbitrary MIDI input device and connected to |
179 |
* an arbitrary audio output device. Here an example setup: |
* an arbitrary audio output device. Here an example setup: |
180 |
* @code |
* @code |
181 |
* S.Channel. MIDI in S.Engine Audio out |
* S.Channel MIDI in S.Engine Audio out |
182 |
* ------------------------------------------------------------------- |
* ------------------------------------------------------------------- |
183 |
* 0 Alsa -> gig::Engine -> Jack |
* 0 Alsa -> gig::Engine -> Jack |
184 |
* 1 VSTi -> Akai::Engine -> VSTi |
* 1 VSTi -> Akai::Engine -> VSTi |
185 |
* 2 Jack -> DLS::Engine -> Jack |
* 2 Jack -> DLS::Engine -> Jack |
186 |
* 3 Jack -> SF::Engine -> Alsa |
* 3 Jack -> SF::Engine -> Alsa |
187 |
* |
* |
188 |
* ... (and so on) ... |
* ... (and so on) ... |
189 |
* @endcode |
* @endcode |
190 |
* |
* |
191 |
* Note that not all audio and MIDI backends and sampler engines listed |
* Note that not all audio and MIDI backends and sampler engines listed |
192 |
* in the example above are already implemented! |
* in the example above might already been implemented! |
193 |
* |
* |
194 |
* As you can see in the example setup, LinuxSampler is capable to use |
* As you can see in the example setup, LinuxSampler is capable to use |
195 |
* several, different audio output and MIDI input systems |
* several, different audio output and MIDI input systems |
196 |
* simultaniously at the same time. Here the example setup shown in the |
* simultaniously at the same time. Here the example setup shown in the |
197 |
* ascpect of MIDI input and audio output devices / drivers: |
* aspect of MIDI input and audio output devices / drivers: |
198 |
* @code |
* @code |
199 |
* ######################### ######################### |
* ######################### ######################### |
200 |
* # AudioOutputDeviceJack # # AudioOutputDeviceVSTi # |
* # AudioOutputDeviceJack # # AudioOutputDeviceVSTi # |
201 |
* ######################### ######################### |
* ######################### ######################### |
202 |
* ^ ^ ^ |
* ^ ^ ^ |
203 |
* /------------>|Sampler Channel 0|-----/ | | |
* /------------>|Sampler Channel 0|-----/ | | |
204 |
* | /--------->|Sampler Channel 1|---------------------/ |
* | /--------->|Sampler Channel 1|---------------------/ |
205 |
* | | /------>|Sampler Channel 2|---------/ |
* | | /------>|Sampler Channel 2|---------/ |
206 |
* | | | /--->|Sampler Channel 3|------------>######################### |
* | | | /--->|Sampler Channel 3|------------>######################### |
207 |
* | | | | ... (and so on) ... # AudioOutputDeviceAlsa # |
* | | | | ... (and so on) ... # AudioOutputDeviceAlsa # |
208 |
* | | | | ######################### |
* | | | | ######################### |
209 |
* | | | \-----------------------------------------------------\ |
* | | | \-----------------------------------------------------\ |
210 |
* | | \--------------------------------------------\ | |
* | | \--------------------------------------------\ | |
211 |
* | \--------------------\ | | |
* | \--------------------\ | | |
212 |
* | | | | |
* | | | | |
213 |
* ####################### ####################### ####################### |
* ####################### ####################### ####################### |
214 |
* # MidiInputDeviceAlsa # # MidiInputDeviceVSTi # # MidiInputDeviceJack # |
* # MidiInputDeviceAlsa # # MidiInputDeviceVSTi # # MidiInputDeviceJack # |
215 |
* ####################### ####################### ####################### |
* ####################### ####################### ####################### |
218 |
* As you can see in this example setup, one device (that is midi input |
* As you can see in this example setup, one device (that is midi input |
219 |
* driver / audio output driver) can be connected multiple times to |
* driver / audio output driver) can be connected multiple times to |
220 |
* different sampler channels. |
* different sampler channels. |
221 |
|
* |
222 |
|
* It's even possible to create multiple instances of the same driver, for |
223 |
|
* example multiple instances of the Alsa output driver to use multiple |
224 |
|
* sound cards at the same time, or multiple instances of the JACK audio |
225 |
|
* output driver to leverage SMP systems or boxes with several hard discs. |
226 |
*/ |
*/ |
227 |
class Sampler { |
class Sampler { |
228 |
public: |
public: |
288 |
std::vector<String> AvailableAudioOutputDrivers(); |
std::vector<String> AvailableAudioOutputDrivers(); |
289 |
|
|
290 |
/** |
/** |
291 |
|
* Returns the names of all available MIDI input drivers. |
292 |
|
*/ |
293 |
|
std::vector<String> AvailableMidiInputDrivers(); |
294 |
|
|
295 |
|
/** |
296 |
|
* Returns the names of all available sampler engine types. |
297 |
|
* @see SamplerChannel::SetEngineType() |
298 |
|
*/ |
299 |
|
std::vector<String> AvailableEngineTypes(); |
300 |
|
|
301 |
|
/** |
302 |
* Create an audio output device. |
* Create an audio output device. |
303 |
* |
* |
304 |
* @param AudioDriver - name of the audio driver |
* @param AudioDriver - name of the audio driver |