/[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 1130 by iliev, Sun Mar 25 18:59:14 2007 UTC revision 1789 by iliev, Sat Nov 1 19:01:27 2008 UTC
# Line 3  Line 3 
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, 2006 Christian Schoenebeck                        *   *   Copyright (C) 2005 - 2008 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  *
# Line 150  namespace LinuxSampler { Line 150  namespace LinuxSampler {
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
# Line 168  namespace LinuxSampler { Line 171  namespace LinuxSampler {
171              void RemoveAllEngineChangeListeners();              void RemoveAllEngineChangeListeners();
172    
173              /**              /**
174                 * Notifies listeners that the engine type of this sampler
175                 * channel is going to be changed soon.
176                 */
177                void fireEngineToBeChanged();
178    
179                /**
180               * Notifies listeners that the engine               * Notifies listeners that the engine
181               * type of this sampler channel is changed.               * type of this sampler channel is changed.
182               */               */
# Line 415  namespace LinuxSampler { Line 424  namespace LinuxSampler {
424               * @param NewCount The new number of active voices.               * @param NewCount The new number of active voices.
425               */               */
426              void fireTotalVoiceCountChanged(int NewCount);              void fireTotalVoiceCountChanged(int NewCount);
427                
428                void AddTotalStreamCountListener(TotalStreamCountListener* l);
429                void RemoveTotalStreamCountListener(TotalStreamCountListener* l);
430                void fireTotalStreamCountChanged(int NewCount);
431    
432              /**              /**
433               * Registers the specified listener to be notified when the number               * Registers the specified listener to be notified when the number
# Line 503  namespace LinuxSampler { Line 516  namespace LinuxSampler {
516               */               */
517              void DestroyMidiInputDevice(MidiInputDevice* pDevice) throw (Exception);              void DestroyMidiInputDevice(MidiInputDevice* pDevice) throw (Exception);
518    
519                 /**
520                 * Gets the current number of all active streams.
521                 * @returns The current number of all active streams.
522                 */
523                int GetDiskStreamCount();
524    
525              /**              /**
526               * Gets the current number of all active voices.               * Gets the current number of all active voices.
527               * @returns The current number of all active voices.               * @returns The current number of all active voices.
# Line 515  namespace LinuxSampler { Line 534  namespace LinuxSampler {
534               */               */
535              void Reset();              void Reset();
536    
537                /**
538                 * Advise the FPU to treat denormal floating point numbers as
539                 * zero, to avoid severe performance penalty when dealing with
540                 * such extreme floating point values.
541                 *
542                 * @returns @c true if FPU supports it, @c false otherwise
543                 */
544                static bool EnableDenormalsAreZeroMode();
545    
546                /**
547                 * Notifies listeners about the current number of voices,
548                 * streams and total voices, and the current fill state of
549                 * the disk stream buffers.
550                 */
551                void fireStatistics();
552    
553          protected:          protected:
554              /**              /**
555               * Notifies listeners that the number of sampler channels has been changed.               * Notifies listeners that the number of sampler channels has been changed.
# Line 523  namespace LinuxSampler { Line 558  namespace LinuxSampler {
558              void fireChannelCountChanged(int NewCount);              void fireChannelCountChanged(int NewCount);
559    
560              /**              /**
561                 * Notifies listeners that the specified sampler channel has just
562                 * been added.
563                 * @param pChannel The new sampler channel.
564                 */
565                void fireChannelAdded(SamplerChannel* pChannel);
566    
567                /**
568                 * Notifies listeners that the specified sampler channel is
569                 * going to be removed soon.
570                 * @param pChannel sampler channel to be removed.
571                 */
572                void fireChannelToBeRemoved(SamplerChannel* pChannel);
573    
574                /**
575               * Notifies listeners that the number of audio output devices has been changed.               * Notifies listeners that the number of audio output devices has been changed.
576               * @param NewCount The new number of audio output devices.               * @param NewCount The new number of audio output devices.
577               */               */
# Line 535  namespace LinuxSampler { Line 584  namespace LinuxSampler {
584              void fireMidiDeviceCountChanged(int NewCount);              void fireMidiDeviceCountChanged(int NewCount);
585    
586              /**              /**
587                 * Notifies listeners that the supplied MIDI input device is
588                 * going to be destroyed soon.
589                 * @param pDevice MIDI input device to be destroyed
590                 */
591                void fireMidiDeviceToBeDestroyed(MidiInputDevice* pDevice);
592    
593                /**
594                 * Notifies listeners that the supplied MIDI input device was
595                 * just created.
596                 * @param pDevice new MIDI input device
597                 */
598                void fireMidiDeviceCreated(MidiInputDevice* pDevice);
599    
600                /**
601               * Notifies listeners that the number of effect sends               * Notifies listeners that the number of effect sends
602               * on a particular sampler channel is changed.               * on a particular sampler channel is changed.
603               * @param ChannelId The numerical ID of the sampler channel.               * @param ChannelId The numerical ID of the sampler channel.
# Line 550  namespace LinuxSampler { Line 613  namespace LinuxSampler {
613              AudioOutputDeviceMap  mAudioOutputDevices; ///< contains all created audio output devices              AudioOutputDeviceMap  mAudioOutputDevices; ///< contains all created audio output devices
614              MidiInputDeviceMap    mMidiInputDevices;   ///< contains all created MIDI input devices              MidiInputDeviceMap    mMidiInputDevices;   ///< contains all created MIDI input devices
615    
616                // statistics cache
617                uint uiOldTotalVoiceCount;
618                uint uiOldTotalStreamCount;
619                std::map<uint, uint> mOldVoiceCounts;
620                std::map<uint, uint> mOldStreamCounts;
621    
622              friend class SamplerChannel;              friend class SamplerChannel;
623    
624          private:          private:
# Line 559  namespace LinuxSampler { Line 628  namespace LinuxSampler {
628              ListenerList<VoiceCountListener*> llVoiceCountListeners;              ListenerList<VoiceCountListener*> llVoiceCountListeners;
629              ListenerList<StreamCountListener*> llStreamCountListeners;              ListenerList<StreamCountListener*> llStreamCountListeners;
630              ListenerList<BufferFillListener*> llBufferFillListeners;              ListenerList<BufferFillListener*> llBufferFillListeners;
631                ListenerList<TotalStreamCountListener*> llTotalStreamCountListeners;
632              ListenerList<TotalVoiceCountListener*> llTotalVoiceCountListeners;              ListenerList<TotalVoiceCountListener*> llTotalVoiceCountListeners;
633              ListenerList<FxSendCountListener*> llFxSendCountListeners;              ListenerList<FxSendCountListener*> llFxSendCountListeners;
634    
# Line 567  namespace LinuxSampler { Line 637  namespace LinuxSampler {
637                      void SetSampler(Sampler* pSampler) { this->pSampler = pSampler; }                      void SetSampler(Sampler* pSampler) { this->pSampler = pSampler; }
638    
639                      /**                      /**
640                         * Invoked when the engine type of the specified sampler
641                         * channel is going to be changed soon.
642                         * @param ChannelId The numerical ID of the sampler channel
643                         */
644                        virtual void EngineToBeChanged(int ChannelId);
645    
646                        /**
647                       * Invoked when the engine type of the                       * Invoked when the engine type of the
648                       * specified sampler channel is changed.                       * specified sampler channel is changed.
649                       * @param ChannelId The numerical ID of the sampler                       * @param ChannelId The numerical ID of the sampler

Legend:
Removed from v.1130  
changed lines
  Added in v.1789

  ViewVC Help
Powered by ViewVC