1 |
schoenebeck |
887 |
/*************************************************************************** |
2 |
|
|
* * |
3 |
|
|
* LinuxSampler - modular, streaming capable sampler * |
4 |
|
|
* * |
5 |
|
|
* Copyright (C) 2003, 2004 by Benno Senoner and Christian Schoenebeck * |
6 |
|
|
* Copyright (C) 2005, 2006 Christian Schoenebeck * |
7 |
|
|
* * |
8 |
|
|
* This program is free software; you can redistribute it and/or modify * |
9 |
|
|
* it under the terms of the GNU General Public License as published by * |
10 |
|
|
* the Free Software Foundation; either version 2 of the License, or * |
11 |
|
|
* (at your option) any later version. * |
12 |
|
|
* * |
13 |
|
|
* This program is distributed in the hope that it will be useful, * |
14 |
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of * |
15 |
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * |
16 |
|
|
* GNU General Public License for more details. * |
17 |
|
|
* * |
18 |
|
|
* You should have received a copy of the GNU General Public License * |
19 |
|
|
* along with this program; if not, write to the Free Software * |
20 |
|
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, * |
21 |
|
|
* MA 02111-1307 USA * |
22 |
|
|
***************************************************************************/ |
23 |
|
|
|
24 |
|
|
#ifndef __LS_ENGINE_H__ |
25 |
|
|
#define __LS_ENGINE_H__ |
26 |
|
|
|
27 |
|
|
#include "../common/global.h" |
28 |
|
|
|
29 |
|
|
namespace LinuxSampler { |
30 |
|
|
|
31 |
|
|
/** @brief LinuxSampler Sampler Engine Interface |
32 |
|
|
* |
33 |
|
|
* Abstract base interface class for all LinuxSampler engines which |
34 |
|
|
* defines all mandatory methods which have to be implemented by all |
35 |
|
|
* sampler engine implementations. |
36 |
|
|
*/ |
37 |
|
|
class Engine { |
38 |
|
|
public: |
39 |
|
|
|
40 |
|
|
///////////////////////////////////////////////////////////////// |
41 |
|
|
// abstract methods |
42 |
|
|
// (these have to be implemented by the descendant) |
43 |
|
|
|
44 |
|
|
virtual int RenderAudio(uint Samples) = 0; |
45 |
|
|
virtual void SendSysex(void* pData, uint Size) = 0; |
46 |
|
|
virtual void Reset() = 0; |
47 |
|
|
virtual void Enable() = 0; |
48 |
|
|
virtual void Disable() = 0; |
49 |
|
|
virtual uint VoiceCount() = 0; |
50 |
|
|
virtual uint VoiceCountMax() = 0; |
51 |
|
|
virtual bool DiskStreamSupported() = 0; |
52 |
|
|
virtual uint DiskStreamCount() = 0; |
53 |
|
|
virtual uint DiskStreamCountMax() = 0; |
54 |
|
|
virtual String DiskStreamBufferFillBytes() = 0; |
55 |
|
|
virtual String DiskStreamBufferFillPercentage() = 0; |
56 |
|
|
virtual String Description() = 0; |
57 |
|
|
virtual String Version() = 0; |
58 |
|
|
virtual String EngineName() = 0; |
59 |
|
|
|
60 |
|
|
protected: |
61 |
|
|
virtual ~Engine() {}; // MUST only be destroyed by EngineFactory |
62 |
|
|
friend class EngineFactory; |
63 |
|
|
}; |
64 |
|
|
|
65 |
|
|
} // namespace LinuxSampler |
66 |
|
|
|
67 |
|
|
#endif // __LS_ENGINE_H__ |