1 |
/*************************************************************************** |
2 |
* * |
3 |
* LinuxSampler - modular, streaming capable sampler * |
4 |
* * |
5 |
* Copyright (C) 2003,2004 by Benno Senoner and Christian Schoenebeck * |
6 |
* Copyright (C) 2005-2008 Christian Schoenebeck * |
7 |
* Copyright (C) 2009 Christian Schoenebeck and Grigor Iliev * |
8 |
* Copyright (C) 2014-2016 Christian Schoenebeck * |
9 |
* * |
10 |
* This program is free software; you can redistribute it and/or modify * |
11 |
* it under the terms of the GNU General Public License as published by * |
12 |
* the Free Software Foundation; either version 2 of the License, or * |
13 |
* (at your option) any later version. * |
14 |
* * |
15 |
* This program is distributed in the hope that it will be useful, * |
16 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of * |
17 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * |
18 |
* GNU General Public License for more details. * |
19 |
* * |
20 |
* You should have received a copy of the GNU General Public License * |
21 |
* along with this program; if not, write to the Free Software * |
22 |
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, * |
23 |
* MA 02111-1307 USA * |
24 |
***************************************************************************/ |
25 |
|
26 |
#ifndef __LS_GIG_ENGINE_H__ |
27 |
#define __LS_GIG_ENGINE_H__ |
28 |
|
29 |
#include "DiskThread.h" |
30 |
#include "../EngineBase.h" |
31 |
#include "Voice.h" |
32 |
|
33 |
#if AC_APPLE_UNIVERSAL_BUILD |
34 |
# include <libgig/gig.h> |
35 |
#else |
36 |
# include <gig.h> |
37 |
#endif |
38 |
|
39 |
namespace LinuxSampler { namespace gig { |
40 |
|
41 |
class Engine: public LinuxSampler::EngineBase<Voice, ::gig::Region, ::gig::DimensionRegion, DiskThread, InstrumentResourceManager, ::gig::Instrument> { |
42 |
public: |
43 |
Engine() { } |
44 |
virtual ~Engine() { } |
45 |
// implementation of abstract methods derived from class 'LinuxSampler::Engine' |
46 |
virtual bool DiskStreamSupported() OVERRIDE; |
47 |
virtual String Description() OVERRIDE; |
48 |
virtual String Version() OVERRIDE; |
49 |
|
50 |
virtual Format GetEngineFormat() OVERRIDE; |
51 |
|
52 |
virtual void ProcessControlChange ( |
53 |
LinuxSampler::EngineChannel* pEngineChannel, |
54 |
Pool<Event>::Iterator& itControlChangeEvent |
55 |
) OVERRIDE; |
56 |
virtual void ProcessChannelPressure(LinuxSampler::EngineChannel* pEngineChannel, Pool<Event>::Iterator& itChannelPressureEvent) OVERRIDE; |
57 |
virtual void ProcessPolyphonicKeyPressure(LinuxSampler::EngineChannel* pEngineChannel, Pool<Event>::Iterator& itNotePressureEvent) OVERRIDE; |
58 |
virtual void CreateInstrumentScriptVM() OVERRIDE; |
59 |
friend class Voice; |
60 |
|
61 |
protected: |
62 |
virtual DiskThread* CreateDiskThread() OVERRIDE; |
63 |
|
64 |
virtual Pool<Voice>::Iterator LaunchVoice ( |
65 |
LinuxSampler::EngineChannel* pEngineChannel, |
66 |
Pool<Event>::Iterator& itNoteOnEvent, |
67 |
int iLayer, |
68 |
bool ReleaseTriggerVoice, |
69 |
bool VoiceStealing, |
70 |
bool HandleKeyGroupConflicts |
71 |
) OVERRIDE; |
72 |
|
73 |
virtual void TriggerNewVoices ( |
74 |
LinuxSampler::EngineChannel* pEngineChannel, |
75 |
RTList<Event>::Iterator& itNoteOnEvent, |
76 |
bool HandleKeyGroupConflicts |
77 |
) OVERRIDE; |
78 |
|
79 |
void TriggerReleaseVoices ( |
80 |
LinuxSampler::EngineChannel* pEngineChannel, |
81 |
RTList<Event>::Iterator& itNoteOffEvent |
82 |
) OVERRIDE; |
83 |
}; |
84 |
|
85 |
}} // namespace LinuxSampler::gig |
86 |
|
87 |
#endif /* __LS_GIG_ENGINE_H__ */ |
88 |
|