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. |
558 |
*/ |
*/ |
559 |
void Reset(); |
void Reset(); |
560 |
|
|
561 |
|
/** |
562 |
|
* Advise the FPU to treat denormal floating point numbers as |
563 |
|
* zero, to avoid severe performance penalty when dealing with |
564 |
|
* such extreme floating point values. |
565 |
|
* |
566 |
|
* @returns @c true if FPU supports it, @c false otherwise |
567 |
|
*/ |
568 |
|
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 |
protected: |
protected: |
578 |
/** |
/** |
579 |
* Notifies listeners that the number of sampler channels has been changed. |
* Notifies listeners that the number of sampler channels has been changed. |
637 |
AudioOutputDeviceMap mAudioOutputDevices; ///< contains all created audio output devices |
AudioOutputDeviceMap mAudioOutputDevices; ///< contains all created audio output devices |
638 |
MidiInputDeviceMap mMidiInputDevices; ///< contains all created MIDI input devices |
MidiInputDeviceMap mMidiInputDevices; ///< contains all created MIDI input devices |
639 |
|
|
640 |
|
// statistics cache |
641 |
|
uint uiOldTotalVoiceCount; |
642 |
|
uint uiOldTotalStreamCount; |
643 |
|
std::map<uint, uint> mOldVoiceCounts; |
644 |
|
std::map<uint, uint> mOldStreamCounts; |
645 |
|
|
646 |
friend class SamplerChannel; |
friend class SamplerChannel; |
647 |
|
|
648 |
private: |
private: |