--- qsampler/trunk/src/qsamplerChannel.h 2005/04/01 00:34:58 490 +++ qsampler/trunk/src/qsamplerChannel.h 2005/08/28 00:31:34 758 @@ -22,16 +22,21 @@ #ifndef __qsamplerChannel_h #define __qsamplerChannel_h -#include +#include #include #include #include "qsamplerOptions.h" +class qsamplerDevice; class qsamplerMainForm; +// Typedef'd QMap. +typedef QMap qsamplerChannelRoutingMap; + + //------------------------------------------------------------------------- // qsamplerChannel - Sampler channel structure. // @@ -108,6 +113,20 @@ float volume() const; bool setVolume(float fVolume); + // Sampler channel mute state. + bool channelMute() const; + bool setChannelMute(bool bMute); + + // Sampler channel solo state. + bool channelSolo() const; + bool setChannelSolo(bool bSolo); + + // Audio routing accessors. + int audioChannel(int iAudioOut) const; + bool setAudioChannel(int iAudioOut, int iAudioIn); + // The audio routing map itself. + const qsamplerChannelRoutingMap& audioRouting() const; + // Istrument name remapper. void updateInstrumentName(); @@ -133,6 +152,7 @@ // Common (invalid) name-helpers. static QString noEngineName(); static QString noInstrumentName(); + static QString loadingInstrument(); // Check whether a given file is an instrument file. static bool isInstrumentFile (const QString& sInstrumentFile); @@ -164,8 +184,35 @@ QString m_sAudioDriver; int m_iAudioDevice; float m_fVolume; + bool m_bMute; + bool m_bSolo; + + // The audio routing mapping. + qsamplerChannelRoutingMap m_audioRouting; +}; + + +//------------------------------------------------------------------------- +// qsamplerChannelRoutingTable - Channel routing table widget. +// + +class qsamplerChannelRoutingTable : public QTable +{ + Q_OBJECT + +public: + + // Constructor. + qsamplerChannelRoutingTable(QWidget *pParent = 0, const char *pszName = 0); + // Default destructor. + ~qsamplerChannelRoutingTable(); + + // Common parameter table renderer. + void refresh(qsamplerDevice *pDevice, + const qsamplerChannelRoutingMap& routing); }; + #endif // __qsamplerChannel_h