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 * |
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; |
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(); |