3 |
* LinuxSampler - modular, streaming capable sampler * |
* LinuxSampler - modular, streaming capable sampler * |
4 |
* * |
* * |
5 |
* Copyright (C) 2003, 2004 by Benno Senoner and Christian Schoenebeck * |
* Copyright (C) 2003, 2004 by Benno Senoner and Christian Schoenebeck * |
6 |
* Copyright (C) 2005 - 2008 Christian Schoenebeck * |
* Copyright (C) 2005 - 2009 Christian Schoenebeck * |
7 |
* * |
* * |
8 |
* This program is free software; you can redistribute it and/or modify * |
* This program is free software; you can redistribute it and/or modify * |
9 |
* 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 * |
150 |
* Sampler instance. |
* Sampler instance. |
151 |
*/ |
*/ |
152 |
uint Index(); |
uint Index(); |
153 |
|
|
154 |
|
/** Returns the sampler to which this channel belongs */ |
155 |
|
Sampler* GetSampler(); |
156 |
|
|
157 |
/** |
/** |
158 |
* Registers the specified listener to be notified |
* Registers the specified listener to be notified |
317 |
void RemoveSamplerChannel(uint uiSamplerChannel); |
void RemoveSamplerChannel(uint uiSamplerChannel); |
318 |
|
|
319 |
/** |
/** |
320 |
|
* Destroy and remove all sampler channels from this |
321 |
|
* Sampler instance. |
322 |
|
*/ |
323 |
|
void RemoveAllSamplerChannels(); |
324 |
|
|
325 |
|
/** |
326 |
* Registers the specified listener to be notified |
* Registers the specified listener to be notified |
327 |
* when the number of sampler chanels is changed. |
* when the number of sampler chanels is changed. |
328 |
*/ |
*/ |
506 |
|
|
507 |
/** |
/** |
508 |
* Destroy the given audio output device and takes care if there |
* Destroy the given audio output device and takes care if there |
509 |
* are still sampler angines connected to this device, etc. |
* are still sampler engines connected to this device, etc. |
510 |
* |
* |
511 |
* @throws Exception if sampler channels are still |
* @throws Exception if sampler channels are still |
512 |
* connected to the device |
* connected to the device |
514 |
void DestroyAudioOutputDevice(AudioOutputDevice* pDevice) throw (Exception); |
void DestroyAudioOutputDevice(AudioOutputDevice* pDevice) throw (Exception); |
515 |
|
|
516 |
/** |
/** |
517 |
|
* Destroy all audio output devices and takes care if there |
518 |
|
* are still sampler engines connected to devices, etc. |
519 |
|
* |
520 |
|
* @throws Exception if sampler channels are still |
521 |
|
* connected to device |
522 |
|
*/ |
523 |
|
void DestroyAllAudioOutputDevices() throw (Exception); |
524 |
|
|
525 |
|
/** |
526 |
* Destroy the given MIDI input device and takes care if there |
* Destroy the given MIDI input device and takes care if there |
527 |
* are still sampler angines connected to this device, etc. |
* are still sampler engines connected to this device, etc. |
528 |
* |
* |
529 |
* @throws Exception if sampler channels are still |
* @throws Exception if sampler channels are still |
530 |
* connected to the device |
* connected to the device |
531 |
*/ |
*/ |
532 |
void DestroyMidiInputDevice(MidiInputDevice* pDevice) throw (Exception); |
void DestroyMidiInputDevice(MidiInputDevice* pDevice) throw (Exception); |
533 |
|
|
534 |
|
/** |
535 |
|
* Destroy all MIDI input devices and take care if there |
536 |
|
* are still sampler engines connected to device, etc. |
537 |
|
* |
538 |
|
* @throws Exception if sampler channels are still |
539 |
|
* connected to device |
540 |
|
*/ |
541 |
|
void DestroyAllMidiInputDevices() throw (Exception); |
542 |
|
|
543 |
/** |
/** |
544 |
* Gets the current number of all active streams. |
* Gets the current number of all active streams. |
545 |
* @returns The current number of all active streams. |
* @returns The current number of all active streams. |
567 |
*/ |
*/ |
568 |
static bool EnableDenormalsAreZeroMode(); |
static bool EnableDenormalsAreZeroMode(); |
569 |
|
|
570 |
|
/** |
571 |
|
* Notifies listeners about the current number of voices, |
572 |
|
* streams and total voices, and the current fill state of |
573 |
|
* the disk stream buffers. |
574 |
|
*/ |
575 |
|
void fireStatistics(); |
576 |
|
|
577 |
|
#if defined(WIN32) |
578 |
|
/** |
579 |
|
* Gets the directory where the liblinuxsampler dll is |
580 |
|
* located. |
581 |
|
* @returns installation directory |
582 |
|
*/ |
583 |
|
static String GetInstallDir(); |
584 |
|
#endif |
585 |
protected: |
protected: |
586 |
/** |
/** |
587 |
* Notifies listeners that the number of sampler channels has been changed. |
* Notifies listeners that the number of sampler channels has been changed. |
645 |
AudioOutputDeviceMap mAudioOutputDevices; ///< contains all created audio output devices |
AudioOutputDeviceMap mAudioOutputDevices; ///< contains all created audio output devices |
646 |
MidiInputDeviceMap mMidiInputDevices; ///< contains all created MIDI input devices |
MidiInputDeviceMap mMidiInputDevices; ///< contains all created MIDI input devices |
647 |
|
|
648 |
|
// statistics cache |
649 |
|
uint uiOldTotalVoiceCount; |
650 |
|
uint uiOldTotalStreamCount; |
651 |
|
std::map<uint, uint> mOldVoiceCounts; |
652 |
|
std::map<uint, uint> mOldStreamCounts; |
653 |
|
|
654 |
friend class SamplerChannel; |
friend class SamplerChannel; |
655 |
|
|
656 |
private: |
private: |