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

Contents of /linuxsampler/trunk/src/engines/sfz/Engine.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2244 - (show annotations) (download) (as text)
Thu Aug 18 11:32:33 2011 UTC (12 years, 8 months ago) by iliev
File MIME type: text/x-c++hdr
File size: 3982 byte(s)
* sfz engine: use common pool of CC objects to minimize RAM usage

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

  ViewVC Help
Powered by ViewVC