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-2008 Christian Schoenebeck * |
7 |
* Copyright (C) 2009-2010 Christian Schoenebeck and Grigor Iliev * |
* Copyright (C) 2009-2012 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 * |
38 |
// implementation of abstract methods derived from interface class 'LinuxSampler::EngineChannel' |
// implementation of abstract methods derived from interface class 'LinuxSampler::EngineChannel' |
39 |
virtual void PrepareLoadInstrument(const char* FileName, uint Instrument); |
virtual void PrepareLoadInstrument(const char* FileName, uint Instrument); |
40 |
virtual void Reset(); |
virtual void Reset(); |
41 |
virtual void SendNoteOn(uint8_t Key, uint8_t Velocity); |
virtual void SendNoteOn(uint8_t Key, uint8_t Velocity, uint8_t MidiChannel); |
42 |
virtual void SendNoteOn(uint8_t Key, uint8_t Velocity, int32_t FragmentPos); |
virtual void SendNoteOn(uint8_t Key, uint8_t Velocity, uint8_t MidiChannel, int32_t FragmentPos); |
43 |
virtual void SendNoteOff(uint8_t Key, uint8_t Velocity); |
virtual void SendNoteOff(uint8_t Key, uint8_t Velocity, uint8_t MidiChannel); |
44 |
virtual void SendNoteOff(uint8_t Key, uint8_t Velocity, int32_t FragmentPos); |
virtual void SendNoteOff(uint8_t Key, uint8_t Velocity, uint8_t MidiChannel, int32_t FragmentPos); |
45 |
virtual void SendPitchbend(int Pitch); |
virtual void SendPitchbend(int Pitch, uint8_t MidiChannel); |
46 |
virtual void SendPitchbend(int Pitch, int32_t FragmentPos); |
virtual void SendPitchbend(int Pitch, uint8_t MidiChannel, int32_t FragmentPos); |
47 |
virtual void SendControlChange(uint8_t Controller, uint8_t Value); |
virtual void SendControlChange(uint8_t Controller, uint8_t Value, uint8_t MidiChannel); |
48 |
virtual void SendControlChange(uint8_t Controller, uint8_t Value, int32_t FragmentPos); |
virtual void SendControlChange(uint8_t Controller, uint8_t Value, uint8_t MidiChannel, int32_t FragmentPos); |
49 |
virtual bool StatusChanged(bool bNewStatus = false); |
virtual bool StatusChanged(bool bNewStatus = false); |
50 |
virtual float Volume(); |
virtual float Volume(); |
51 |
virtual void Volume(float f); |
virtual void Volume(float f); |
120 |
SynchronizedConfig< ArrayList<VirtualMidiDevice*> >::Reader virtualMidiDevicesReader_AudioThread; |
SynchronizedConfig< ArrayList<VirtualMidiDevice*> >::Reader virtualMidiDevicesReader_AudioThread; |
121 |
SynchronizedConfig< ArrayList<VirtualMidiDevice*> >::Reader virtualMidiDevicesReader_MidiThread; |
SynchronizedConfig< ArrayList<VirtualMidiDevice*> >::Reader virtualMidiDevicesReader_MidiThread; |
122 |
|
|
123 |
std::map<uint,RTList<Event>*> ActiveKeyGroups; ///< Contains event queues for key groups, ordered by key group ID. |
// specialization of RTList that doesn't require the pool |
124 |
|
// to be provided at construction time |
125 |
|
template<typename T> |
126 |
|
class LazyList : public RTList<T> { |
127 |
|
public: |
128 |
|
using RTList<T>::allocAppend; |
129 |
|
using RTList<T>::pPool; |
130 |
|
|
131 |
|
LazyList() : RTList<T>(0) { } |
132 |
|
typename RTList<T>::Iterator allocAppend(Pool<T>* pool) { |
133 |
|
pPool = pool; |
134 |
|
return allocAppend(); |
135 |
|
} |
136 |
|
}; |
137 |
|
|
138 |
|
typedef std::map<uint, LazyList<Event>*> ActiveKeyGroupMap; |
139 |
|
ActiveKeyGroupMap ActiveKeyGroups; ///< Contains event queues for key groups, ordered by key group ID. |
140 |
|
|
141 |
virtual void ResetControllers(); |
virtual void ResetControllers(); |
142 |
virtual void ResetInternal(); |
virtual void ResetInternal(); |