47 |
class EngineChannel { |
class EngineChannel { |
48 |
public: |
public: |
49 |
|
|
50 |
|
EngineChannel(); |
51 |
|
|
52 |
///////////////////////////////////////////////////////////////// |
///////////////////////////////////////////////////////////////// |
53 |
// abstract methods |
// abstract methods |
54 |
// (these have to be implemented by the descendant) |
// (these have to be implemented by the descendant) |
79 |
virtual Engine* GetEngine() = 0; |
virtual Engine* GetEngine() = 0; |
80 |
virtual String EngineName() = 0; |
virtual String EngineName() = 0; |
81 |
|
|
82 |
|
/** |
83 |
|
* Sets the mute state of this channel. |
84 |
|
* |
85 |
|
* @param state - specifies the mute state of this sampler channel. |
86 |
|
* @throws LinuxSamplerException - if state does not contain valid |
87 |
|
* value. |
88 |
|
*/ |
89 |
|
void SetMute(int state) throw (LinuxSamplerException); |
90 |
|
|
91 |
|
/** |
92 |
|
* Determines whether this channel is muted. |
93 |
|
* |
94 |
|
* @returns 1 if the channel is muted, 0 if the channel is not muted |
95 |
|
* and -1 if the channel is muted because of presence of at least |
96 |
|
* one solo channel. |
97 |
|
*/ |
98 |
|
int GetMute(); |
99 |
|
|
100 |
|
/** |
101 |
|
* Sets the solo state of this channel. |
102 |
|
* |
103 |
|
* @param solo - specifies whether this is a solo channel. |
104 |
|
*/ |
105 |
|
void SetSolo(bool solo); |
106 |
|
|
107 |
|
/** |
108 |
|
* Determines whether this is a solo channel. |
109 |
|
* |
110 |
|
* @returns true if this is a solo channel, false otherwise. |
111 |
|
*/ |
112 |
|
bool GetSolo(); |
113 |
|
|
114 |
int iSamplerChannelIndex; ///< FIXME: nasty hack, might be removed (should be 'virtual EngineChannel* EngineChannel() = 0;', but due to cyclic dependencies only a void* solution would be possible ATM) |
int iSamplerChannelIndex; ///< FIXME: nasty hack, might be removed (should be 'virtual EngineChannel* EngineChannel() = 0;', but due to cyclic dependencies only a void* solution would be possible ATM) |
115 |
|
|
116 |
protected: |
protected: |
117 |
virtual ~EngineChannel() {}; // MUST only be destroyed by EngineChannelFactory |
virtual ~EngineChannel() {}; // MUST only be destroyed by EngineChannelFactory |
118 |
friend class EngineChannelFactory; |
friend class EngineChannelFactory; |
119 |
|
|
120 |
|
private: |
121 |
|
int iMute; |
122 |
|
bool bSolo; |
123 |
}; |
}; |
124 |
|
|
125 |
} // namespace LinuxSampler |
} // namespace LinuxSampler |