--- linuxsampler/trunk/src/Sampler.h 2005/06/22 22:09:28 675 +++ linuxsampler/trunk/src/Sampler.h 2006/06/27 22:57:37 880 @@ -3,7 +3,7 @@ * LinuxSampler - modular, streaming capable sampler * * * * Copyright (C) 2003, 2004 by Benno Senoner and Christian Schoenebeck * - * Copyright (C) 2005 Christian Schoenebeck * + * Copyright (C) 2005, 2006 Christian Schoenebeck * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * @@ -27,7 +27,7 @@ #include #include #include "common/global.h" -#include "common/LinuxSamplerException.h" +#include "common/Exception.h" #include "engines/common/EngineChannel.h" #include "drivers/midi/MidiInputDevice.h" #include "drivers/audio/AudioOutputDevice.h" @@ -39,7 +39,7 @@ /** @brief LinuxSampler sampler channel * - * Encapsulates a channel of a specific sampler engine typ, one + * Encapsulates a channel of a specific sampler engine type, one * connection to a MIDI input device and one connection to an audio * output device. You cannot create an instance of this class on your * own, you have to use the AddSamplerChannel() method of the Sampler @@ -51,9 +51,9 @@ * Assign a sampler engine type to this sampler channel. * * @param EngineType - type of the engine to use - * @throws LinuxSamplerException - if \a EngineType is invalid + * @throws Exception - if \a EngineType is invalid */ - void SetEngineType(String EngineType) throw (LinuxSamplerException); + void SetEngineType(String EngineType) throw (Exception); /** * Connect this sampler channel to an audio output device, that @@ -155,7 +155,6 @@ /** Getting MIDI input device port given its index number. */ MidiInputPort* __GetMidiInputDevicePort(int iMidiPort); - midi_chan_t __GetMidiChannel(); Sampler* pSampler; EngineChannel* pEngineChannel; @@ -289,9 +288,9 @@ * @param Parameters - eventually needed driver parameters to * create the device * @returns pointer to created audio output device - * @throws LinuxSamplerException if device could not be created + * @throws Exception if device could not be created */ - AudioOutputDevice* CreateAudioOutputDevice(String AudioDriver, std::map Parameters) throw (LinuxSamplerException); + AudioOutputDevice* CreateAudioOutputDevice(String AudioDriver, std::map Parameters) throw (Exception); /** * Create a midi input device. @@ -300,9 +299,9 @@ * @param Parameters - eventually needed driver parameters to * create the device * @returns pointer to created midi input device - * @throws LinuxSamplerException if device could not be created + * @throws Exception if device could not be created */ - MidiInputDevice* CreateMidiInputDevice(String MidiDriver, std::map Parameters) throw (LinuxSamplerException); + MidiInputDevice* CreateMidiInputDevice(String MidiDriver, std::map Parameters) throw (Exception); /** * Returns the number of all created audio output devices. @@ -328,19 +327,25 @@ * Destroy the given audio output device and takes care if there * are still sampler angines connected to this device, etc. * - * @throws LinuxSamplerException if sampler channels are still - * connected to the device + * @throws Exception if sampler channels are still + * connected to the device */ - void DestroyAudioOutputDevice(AudioOutputDevice* pDevice) throw (LinuxSamplerException); + void DestroyAudioOutputDevice(AudioOutputDevice* pDevice) throw (Exception); /** * Destroy the given MIDI input device and takes care if there * are still sampler angines connected to this device, etc. * - * @throws LinuxSamplerException if sampler channels are still - * connected to the device + * @throws Exception if sampler channels are still + * connected to the device */ - void DestroyMidiInputDevice(MidiInputDevice* pDevice) throw (LinuxSamplerException); + void DestroyMidiInputDevice(MidiInputDevice* pDevice) throw (Exception); + + /** + * Gets the current number of all active voices. + * @returns The current number of all active voices. + */ + int GetVoiceCount(); /** * Reset the whole sampler. Destroy all engines, sampler