1 |
/*************************************************************************** |
/*************************************************************************** |
2 |
* * |
* * |
3 |
* Copyright (C) 2005 - 2007 Christian Schoenebeck * |
* Copyright (C) 2005 - 2009 Christian Schoenebeck * |
4 |
* * |
* * |
5 |
* This program is free software; you can redistribute it and/or modify * |
* This program is free software; you can redistribute it and/or modify * |
6 |
* 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 * |
26 |
#include "../drivers/midi/midi.h" |
#include "../drivers/midi/midi.h" |
27 |
#include "../drivers/midi/MidiInputDevice.h" |
#include "../drivers/midi/MidiInputDevice.h" |
28 |
#include "../drivers/midi/MidiInputPort.h" |
#include "../drivers/midi/MidiInputPort.h" |
29 |
|
#include "../drivers/midi/VirtualMidiDevice.h" |
30 |
#include "Engine.h" |
#include "Engine.h" |
31 |
#include "FxSend.h" |
#include "FxSend.h" |
32 |
|
|
33 |
namespace LinuxSampler { |
namespace LinuxSampler { |
34 |
|
|
35 |
// just symbol prototyping |
// just symbol prototyping |
36 |
|
class Sampler; |
37 |
|
class SamplerChannel; |
38 |
class AudioOutputDevice; |
class AudioOutputDevice; |
39 |
class MidiInputPort; |
class MidiInputPort; |
40 |
class FxSend; |
class FxSend; |
72 |
virtual bool StatusChanged(bool bNewStatus = false) = 0; |
virtual bool StatusChanged(bool bNewStatus = false) = 0; |
73 |
virtual float Volume() = 0; |
virtual float Volume() = 0; |
74 |
virtual void Volume(float f) = 0; |
virtual void Volume(float f) = 0; |
75 |
|
virtual float Pan() = 0; |
76 |
|
virtual void Pan(float f) = 0; |
77 |
virtual uint Channels() = 0; |
virtual uint Channels() = 0; |
78 |
virtual void Connect(AudioOutputDevice* pAudioOut) = 0; |
virtual void Connect(AudioOutputDevice* pAudioOut) = 0; |
79 |
virtual void DisconnectAudioOutputDevice() = 0; |
virtual void DisconnectAudioOutputDevice() = 0; |
94 |
virtual FxSend* GetFxSend(uint FxSendIndex) = 0; |
virtual FxSend* GetFxSend(uint FxSendIndex) = 0; |
95 |
virtual uint GetFxSendCount() = 0; |
virtual uint GetFxSendCount() = 0; |
96 |
virtual void RemoveFxSend(FxSend* pFxSend) = 0; |
virtual void RemoveFxSend(FxSend* pFxSend) = 0; |
97 |
|
virtual void Connect(VirtualMidiDevice* pDevice) = 0; |
98 |
|
virtual void Disconnect(VirtualMidiDevice* pDevice) = 0; |
99 |
|
|
100 |
|
|
101 |
///////////////////////////////////////////////////////////////// |
///////////////////////////////////////////////////////////////// |
249 |
* Reset to no RPN controller currently selected. |
* Reset to no RPN controller currently selected. |
250 |
*/ |
*/ |
251 |
void ResetMidiRpnController(); |
void ResetMidiRpnController(); |
252 |
|
|
253 |
/** |
/** |
254 |
* Registers the specified listener to be notified when the number |
* Registers the specified listener to be notified when the number |
255 |
* of effect sends on this channel is changed. |
* of effect sends on this channel is changed. |
281 |
*/ |
*/ |
282 |
int GetMidiRpnController(); |
int GetMidiRpnController(); |
283 |
|
|
284 |
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) |
/** |
285 |
|
* Gets the current number of active voices. |
286 |
|
*/ |
287 |
|
uint GetVoiceCount(); |
288 |
|
|
289 |
|
/** |
290 |
|
* Sets the current number of active voices. |
291 |
|
*/ |
292 |
|
void SetVoiceCount(uint Voices); |
293 |
|
|
294 |
|
/** |
295 |
|
* Gets the current number of active disk streams. |
296 |
|
*/ |
297 |
|
uint GetDiskStreamCount(); |
298 |
|
|
299 |
|
/** |
300 |
|
* Sets the current number of active disk streams. |
301 |
|
*/ |
302 |
|
void SetDiskStreamCount(uint Streams); |
303 |
|
|
304 |
|
SamplerChannel* GetSamplerChannel(); |
305 |
|
|
306 |
|
void SetSamplerChannel(SamplerChannel* pChannel); |
307 |
|
|
308 |
|
/** Returns the sampler to which this channel belongs */ |
309 |
|
Sampler* GetSampler(); |
310 |
|
|
311 |
protected: |
protected: |
312 |
EngineChannel(); |
EngineChannel(); |
313 |
virtual ~EngineChannel() {}; // MUST only be destroyed by EngineChannelFactory |
virtual ~EngineChannel(); // MUST only be destroyed by EngineChannelFactory |
314 |
|
|
315 |
/** |
/** |
316 |
* Notifies listeners that the number of effect sends |
* Notifies listeners that the number of effect sends |
323 |
friend class EngineChannelFactory; |
friend class EngineChannelFactory; |
324 |
|
|
325 |
private: |
private: |
326 |
int iMute; |
void* pPrivateData; |
|
bool bSolo; |
|
|
uint8_t uiMidiProgram; |
|
|
uint8_t uiMidiBankMsb; |
|
|
uint8_t uiMidiBankLsb; |
|
|
uint8_t uiMidiRpnMsb; ///< MIDI Registered Parameter Number (upper 8 bits / coarse) |
|
|
uint8_t uiMidiRpnLsb; ///< MIDI Registered Parameter Number (lower 8 bits / fine) |
|
|
bool bMidiBankMsbReceived; |
|
|
bool bMidiBankLsbReceived; |
|
|
bool bProgramChangeReceived; |
|
|
bool bMidiRpnReceived; |
|
|
int iMidiInstrumentMap; |
|
|
ListenerList<FxSendCountListener*> llFxSendCountListeners; |
|
327 |
}; |
}; |
328 |
|
|
329 |
} // namespace LinuxSampler |
} // namespace LinuxSampler |