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 * |
33 |
|
|
34 |
namespace LinuxSampler { |
namespace LinuxSampler { |
35 |
|
|
|
/** |
|
|
* Which sampler engine to be used. |
|
|
*/ |
|
|
enum engine_type_t { |
|
|
engine_type_gig |
|
|
}; |
|
|
|
|
|
/** |
|
|
* Which audio output system to be used. |
|
|
*/ |
|
|
enum audio_output_type_t { |
|
|
audio_output_type_alsa, |
|
|
audio_output_type_jack |
|
|
}; |
|
|
|
|
|
/** |
|
|
* Which MIDI input system to be used. |
|
|
*/ |
|
|
enum midi_input_type_t { |
|
|
midi_input_type_alsa |
|
|
}; |
|
|
|
|
36 |
// just symbol prototyping |
// just symbol prototyping |
37 |
class Sampler; |
class Sampler; |
38 |
|
|
54 |
* |
* |
55 |
* @param EngineType - type of the engine to deploy |
* @param EngineType - type of the engine to deploy |
56 |
*/ |
*/ |
57 |
void LoadEngine(engine_type_t EngineType); |
void LoadEngine(Engine::type_t EngineType); |
58 |
|
|
59 |
/** |
/** |
60 |
* Connect this sampler channel to an audio output device (that |
* Connect this sampler channel to an audio output device (that |
67 |
* |
* |
68 |
* @param AudioType - audio output system to connect to |
* @param AudioType - audio output system to connect to |
69 |
*/ |
*/ |
70 |
void SetAudioOutputDevice(audio_output_type_t AudioType); |
void SetAudioOutputDevice(AudioOutputDevice::type_t AudioType); |
71 |
|
|
72 |
/** |
/** |
73 |
* Connect this sampler channel to and MIDI input device (that |
* Connect this sampler channel to and MIDI input device (that |
83 |
* sampler channel should listen to |
* sampler channel should listen to |
84 |
* (default: listen on all MIDI channels) |
* (default: listen on all MIDI channels) |
85 |
*/ |
*/ |
86 |
void SetMidiInputDevice(midi_input_type_t MidiType, MidiInputDevice::midi_chan_t MidiChannel = MidiInputDevice::midi_chan_all); |
void SetMidiInputDevice(MidiInputDevice::type_t MidiType, MidiInputDevice::midi_chan_t MidiChannel = MidiInputDevice::midi_chan_all); |
87 |
|
|
88 |
/** |
/** |
89 |
* Returns the engine that was deployed on this sampler channel. |
* Returns the engine that was deployed on this sampler channel. |
232 |
* @param AudioType - desired audio output system to use |
* @param AudioType - desired audio output system to use |
233 |
* @returns pointer to created audio output device |
* @returns pointer to created audio output device |
234 |
*/ |
*/ |
235 |
AudioOutputDevice* CreateAudioOutputDevice(audio_output_type_t AudioType); |
AudioOutputDevice* CreateAudioOutputDevice(AudioOutputDevice::type_t AudioType); |
236 |
|
|
237 |
/** |
/** |
238 |
* Returns the audio output device of the given type. |
* Returns the audio output device of the given type. |
241 |
* @returns pointer to audio output device or NULL if device of |
* @returns pointer to audio output device or NULL if device of |
242 |
* desired type is not yet created |
* desired type is not yet created |
243 |
*/ |
*/ |
244 |
AudioOutputDevice* GetAudioOutputDevice(audio_output_type_t AudioType); |
AudioOutputDevice* GetAudioOutputDevice(AudioOutputDevice::type_t AudioType); |
245 |
|
|
246 |
/** |
/** |
247 |
* Create a MIDI input device of the given type. |
* Create a MIDI input device of the given type. |
249 |
* @param MidiType - desired MIDI input system to use |
* @param MidiType - desired MIDI input system to use |
250 |
* @returns pointer to created MIDI input device |
* @returns pointer to created MIDI input device |
251 |
*/ |
*/ |
252 |
MidiInputDevice* CreateMidiInputDevice(midi_input_type_t MidiType); |
MidiInputDevice* CreateMidiInputDevice(MidiInputDevice::type_t MidiType); |
253 |
|
|
254 |
/** |
/** |
255 |
* Returns the MIDI input device of the given type. |
* Returns the MIDI input device of the given type. |
258 |
* @returns pointer to MIDI input device or NULL if device of |
* @returns pointer to MIDI input device or NULL if device of |
259 |
* desired type is not yet created |
* desired type is not yet created |
260 |
*/ |
*/ |
261 |
MidiInputDevice* GetMidiInputDevice(midi_input_type_t MidiType); |
MidiInputDevice* GetMidiInputDevice(MidiInputDevice::type_t MidiType); |
262 |
|
|
263 |
protected: |
protected: |
264 |
typedef std::map<audio_output_type_t, AudioOutputDevice*> AudioOutputDeviceMap; |
typedef std::map<AudioOutputDevice::type_t, AudioOutputDevice*> AudioOutputDeviceMap; |
265 |
typedef std::map<midi_input_type_t, MidiInputDevice*> MidiInputDeviceMap; |
typedef std::map<MidiInputDevice::type_t, MidiInputDevice*> MidiInputDeviceMap; |
266 |
|
|
267 |
std::vector<SamplerChannel*> vSamplerChannels; ///< contains all created sampler channels |
std::vector<SamplerChannel*> vSamplerChannels; ///< contains all created sampler channels |
268 |
AudioOutputDeviceMap AudioOutputDevices; ///< contains all created audio output devices |
AudioOutputDeviceMap AudioOutputDevices; ///< contains all created audio output devices |