/[svn]/linuxsampler/trunk/src/Sampler.h
ViewVC logotype

Diff of /linuxsampler/trunk/src/Sampler.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 64 by schoenebeck, Thu May 6 20:06:20 2004 UTC revision 123 by schoenebeck, Mon Jun 14 19:33:16 2004 UTC
# Line 40  namespace LinuxSampler { Line 40  namespace LinuxSampler {
40       *       *
41       * Encapsulates one sampler engine, one connection to a MIDI input       * Encapsulates one sampler engine, one connection to a MIDI input
42       * device and one connection to an audio output device. You cannot       * device and one connection to an audio output device. You cannot
43       * create an instance of this class on you own, you have to use the       * create an instance of this class on your own, you have to use the
44       * AddSamplerChannel() method of the Sampler object to create a new       * AddSamplerChannel() method of the Sampler object to create a new
45       * sampler channel.       * sampler channel.
46       */       */
# Line 54  namespace LinuxSampler { Line 54  namespace LinuxSampler {
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); // TODO: to be changed to 'void LoadEngine(String EngineType) throws (LinuxSamplerException);'
58    
59              /**              /**
60               * Connect this sampler channel to an audio output device (that               * Connect this sampler channel to an audio output device, that
61               * is audio output driver) of the given type. If the audio               * is an instance of an audio output driver. If this sampler
62               * output for the desired audio output system is not yet               * channel was already connected to an audio output device, then
63               * created, then it will be created automatically, but with               * the old connection will automatically be removed before.
              * default settings though. If this sampler channel was already  
              * connected to an audio output device, then the old connection  
              * will automatically be removed before.  
64               *               *
65               * @param AudioType - audio output system to connect to               * @param pDevice - audio output device to connect to
66               */               */
67              void SetAudioOutputDevice(AudioOutputDevice::type_t AudioType);              void SetAudioOutputDevice(AudioOutputDevice* pDevice);
68    
69              /**              /**
70               * Connect this sampler channel to and MIDI input device (that               * Connect this sampler channel to and MIDI input device (that
# Line 83  namespace LinuxSampler { Line 80  namespace LinuxSampler {
80               *                      sampler channel should listen to               *                      sampler channel should listen to
81               *                      (default: listen on all MIDI channels)               *                      (default: listen on all MIDI channels)
82               */               */
83              void SetMidiInputDevice(MidiInputDevice::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); // TODO: 'MidiType' type to be changed to 'MidiInputDevice*'
84    
85              /**              /**
86               * Returns the engine that was deployed on this sampler channel.               * Returns the engine that was deployed on this sampler channel.
# Line 226  namespace LinuxSampler { Line 223  namespace LinuxSampler {
223               */               */
224              void RemoveSamplerChannel(uint uiSamplerChannel);              void RemoveSamplerChannel(uint uiSamplerChannel);
225    
226                std::vector<String> AvailableAudioOutputDrivers();
227    
228              /**              /**
229               * Create an audio output device of the given type.               * Create an audio output device of the given type.
230               *               *
231               * @param AudioType - desired audio output system to use               * @param AudioDriver - name of the audio driver
232                 * @param Parameters - eventually needed driver parameters to
233                 *                     create the device
234               * @returns  pointer to created audio output device               * @returns  pointer to created audio output device
235                 * @throws LinuxSamplerException  if device could not be created
236               */               */
237              AudioOutputDevice* CreateAudioOutputDevice(AudioOutputDevice::type_t AudioType);              AudioOutputDevice* CreateAudioOutputDevice(String AudioDriver, std::map<String,String> Parameters) throw (LinuxSamplerException);
238    
239              /**              uint AudioOutputDevices();
240               * Returns the audio output device of the given type.  
241               *              std::map<uint, AudioOutputDevice*> GetAudioOutputDevices();
242               * @param AudioType - desired audio output system to use  
243               * @returns  pointer to audio output device or NULL if device of              void DestroyAudioOutputDevice(AudioOutputDevice* pDevice) throw (LinuxSamplerException);
              *           desired type is not yet created  
              */  
             AudioOutputDevice* GetAudioOutputDevice(AudioOutputDevice::type_t AudioType);  
244    
245              /**              /**
246               * Create a MIDI input device of the given type.               * Create a MIDI input device of the given type.
# Line 249  namespace LinuxSampler { Line 248  namespace LinuxSampler {
248               * @param MidiType - desired MIDI input system to use               * @param MidiType - desired MIDI input system to use
249               * @returns  pointer to created MIDI input device               * @returns  pointer to created MIDI input device
250               */               */
251              MidiInputDevice* CreateMidiInputDevice(MidiInputDevice::type_t MidiType);              MidiInputDevice* CreateMidiInputDevice(MidiInputDevice::type_t MidiType); //TODO: to be changed to 'MidiInputDevice* CreateMidiInputDevice(String MidiDriver, std::map<String,String> Parameters) throw (LinuxSamplerException);'
252    
253              /**              /**
254               * Returns the MIDI input device of the given type.               * Returns the MIDI input device of the given type.
# Line 261  namespace LinuxSampler { Line 260  namespace LinuxSampler {
260              MidiInputDevice* GetMidiInputDevice(MidiInputDevice::type_t MidiType);              MidiInputDevice* GetMidiInputDevice(MidiInputDevice::type_t MidiType);
261    
262          protected:          protected:
263              typedef std::map<AudioOutputDevice::type_t, AudioOutputDevice*> AudioOutputDeviceMap;              typedef std::map<uint, AudioOutputDevice*> AudioOutputDeviceMap;
264              typedef std::map<MidiInputDevice::type_t, MidiInputDevice*> MidiInputDeviceMap;              typedef std::map<MidiInputDevice::type_t, MidiInputDevice*> MidiInputDeviceMap;
265    
266              std::vector<SamplerChannel*> vSamplerChannels;   ///< contains all created sampler channels              std::vector<SamplerChannel*> vSamplerChannels;   ///< contains all created sampler channels
267              AudioOutputDeviceMap         AudioOutputDevices; ///< contains all created audio output devices              AudioOutputDeviceMap         mAudioOutputDevices; ///< contains all created audio output devices
268              MidiInputDeviceMap           MidiInputDevices;              MidiInputDeviceMap           MidiInputDevices;
269    
270                template<class T> inline String ToString(T o) {
271                    std::stringstream ss;
272                    ss << o;
273                    return ss.str();
274                }
275    
276              friend class SamplerChannel;              friend class SamplerChannel;
277      };      };
278  }  }

Legend:
Removed from v.64  
changed lines
  Added in v.123

  ViewVC Help
Powered by ViewVC