/[svn]/linuxsampler/trunk/src/engines/AbstractEngine.h
ViewVC logotype

Diff of /linuxsampler/trunk/src/engines/AbstractEngine.h

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

revision 2015 by iliev, Sun Oct 25 22:22:52 2009 UTC revision 2072 by persson, Sat Mar 20 11:37:52 2010 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-2009 Christian Schoenebeck                         *   *   Copyright (C) 2005-2008 Christian Schoenebeck                         *
7   *   Copyright (C) 2009 Grigor Iliev                                       *   *   Copyright (C) 2009-2010 Christian Schoenebeck and Grigor Iliev        *
8   *                                                                         *   *                                                                         *
9   *   This program is free software; you can redistribute it and/or modify  *   *   This program is free software; you can redistribute it and/or modify  *
10   *   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 92  namespace LinuxSampler { Line 92  namespace LinuxSampler {
92              EventGenerator*            pEventGenerator;              EventGenerator*            pEventGenerator;
93              RTList<Event>*             pGlobalEvents;         ///< All engine global events for the current audio fragment (usually only SysEx messages).              RTList<Event>*             pGlobalEvents;         ///< All engine global events for the current audio fragment (usually only SysEx messages).
94              Pool<Event>*               pEventPool;            ///< Contains all Event objects that can be used.              Pool<Event>*               pEventPool;            ///< Contains all Event objects that can be used.
95              RingBuffer<uint8_t,false>* pSysexBuffer;       ///< Input buffer for MIDI system exclusive messages.              RingBuffer<uint8_t,false>* pSysexBuffer;          ///< Input buffer for MIDI system exclusive messages.
96              uint                       SampleRate;            ///< Sample rate of the engines output audio signal (in Hz)              uint                       SampleRate;            ///< Sample rate of the engines output audio signal (in Hz)
97              uint                       MaxSamplesPerCycle;    ///< Size of each audio output buffer              uint                       MaxSamplesPerCycle;    ///< Size of each audio output buffer
98              unsigned long              FrameTime; ///< Time in frames of the start of the current audio fragment              unsigned long              FrameTime;             ///< Time in frames of the start of the current audio fragment
99              int                        ActiveVoiceCountMax;   ///< the maximum voice usage since application start              int                        ActiveVoiceCountMax;   ///< the maximum voice usage since application start
100              atomic_t                   ActiveVoiceCount; ///< number of currently active voices              atomic_t                   ActiveVoiceCount;      ///< number of currently active voices
101                int                        VoiceSpawnsLeft;       ///< We only allow CONFIG_MAX_VOICES voices to be spawned per audio fragment, we use this variable to ensure this limit.
102    
103              void RouteAudio(EngineChannel* pEngineChannel, uint Samples);              void RouteAudio(EngineChannel* pEngineChannel, uint Samples);
104              void ClearEventLists();              void ClearEventLists();
# Line 113  namespace LinuxSampler { Line 114  namespace LinuxSampler {
114    
115              uint8_t GSCheckSum(const RingBuffer<uint8_t,false>::NonVolatileReader AddrReader, uint DataSize);              uint8_t GSCheckSum(const RingBuffer<uint8_t,false>::NonVolatileReader AddrReader, uint DataSize);
116    
117                float Random() {
118                    RandomSeed = RandomSeed * 1103515245 + 12345; // classic pseudo random number generator
119                    return RandomSeed / 4294967296.0f;
120                }
121    
122              virtual void ResetInternal() = 0;              virtual void ResetInternal() = 0;
123              virtual void KillAllVoices(EngineChannel* pEngineChannel, Pool<Event>::Iterator& itKillEvent) = 0;              virtual void KillAllVoices(EngineChannel* pEngineChannel, Pool<Event>::Iterator& itKillEvent) = 0;
124              virtual void ProcessNoteOn(EngineChannel* pEngineChannel, Pool<Event>::Iterator& itNoteOnEvent) = 0;              virtual void ProcessNoteOn(EngineChannel* pEngineChannel, Pool<Event>::Iterator& itNoteOnEvent) = 0;
# Line 122  namespace LinuxSampler { Line 128  namespace LinuxSampler {
128    
129          private:          private:
130              static std::map<Format, std::map<AudioOutputDevice*,AbstractEngine*> > engines;              static std::map<Format, std::map<AudioOutputDevice*,AbstractEngine*> > engines;
131                uint32_t RandomSeed; ///< State of the random number generator used by the random dimension.
132    
133              static float* InitVolumeCurve();              static float* InitVolumeCurve();
134              static float* InitPanCurve();              static float* InitPanCurve();

Legend:
Removed from v.2015  
changed lines
  Added in v.2072

  ViewVC Help
Powered by ViewVC