2 * FxMixer.h - effect-mixer for LMMS
4 * Copyright (c) 2008-2009 Tobias Doerffel <tobydox/at/users.sourceforge.net>
6 * This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public
10 * License as published by the Free Software Foundation; either
11 * version 2 of the License, or (at your option) any later version.
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 GNU
16 * General Public License for more details.
18 * You should have received a copy of the GNU General Public
19 * License along with this program (see COPYING); if not, write to the
20 * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
21 * Boston, MA 02110-1301 USA.
30 #include "EffectChain.h"
31 #include "JournallingObject.h"
34 const int NumFxChannels
= 64;
39 FxChannel( Model
* _parent
);
42 EffectChain m_fxChain
;
47 sampleFrame
* m_buffer
;
48 BoolModel m_muteModel
;
49 FloatModel m_volumeModel
;
57 class FxMixer
: public JournallingObject
, public Model
63 void mixToChannel( const sampleFrame
* _buf
, fx_ch_t _ch
);
64 void processChannel( fx_ch_t _ch
, sampleFrame
* _buf
= NULL
);
66 void prepareMasterMix();
67 void masterMix( sampleFrame
* _buf
);
72 virtual void saveSettings( QDomDocument
& _doc
, QDomElement
& _parent
);
73 virtual void loadSettings( const QDomElement
& _this
);
75 virtual QString
nodeName() const
80 FxChannel
* effectChannel( int _ch
)
82 if( _ch
>= 0 && _ch
<= NumFxChannels
)
84 return m_fxChannels
[_ch
];
91 FxChannel
* m_fxChannels
[NumFxChannels
+1]; // +1 = master
94 friend class mixerWorkerThread
;
95 friend class FxMixerView
;