summaryrefslogtreecommitdiff
path: root/muse2/muse/audiotrack.cpp
diff options
context:
space:
mode:
authorRobert Jonsson <spamatica@gmail.com>2012-10-04 16:08:51 +0000
committerRobert Jonsson <spamatica@gmail.com>2012-10-04 16:08:51 +0000
commit8f81edb163136e8374db131eeefd261fc58e2dc9 (patch)
treeaa107d525e28c06a3543b2de1d1e48d76ac057a3 /muse2/muse/audiotrack.cpp
parent2783d453532728eee509c1e61d4bdd4a5bfac64f (diff)
added gain knob to channel strips
Diffstat (limited to 'muse2/muse/audiotrack.cpp')
-rw-r--r--muse2/muse/audiotrack.cpp23
1 files changed, 23 insertions, 0 deletions
diff --git a/muse2/muse/audiotrack.cpp b/muse2/muse/audiotrack.cpp
index ab750edb..da6f196b 100644
--- a/muse2/muse/audiotrack.cpp
+++ b/muse2/muse/audiotrack.cpp
@@ -40,6 +40,7 @@
#include "dssihost.h"
#include "app.h"
#include "controlfifo.h"
+#include "fastlog.h"
namespace MusECore {
@@ -123,6 +124,7 @@ AudioTrack::AudioTrack(TrackType t)
bufferPos = INT_MAX;
setVolume(1.0);
+ _gain = 1.0;
}
AudioTrack::AudioTrack(const AudioTrack& t, int flags)
@@ -802,6 +804,24 @@ void AudioTrack::setPan(double val)
}
//---------------------------------------------------------
+// pan
+//---------------------------------------------------------
+
+double AudioTrack::gain() const
+ {
+ return _gain;
+ }
+
+//---------------------------------------------------------
+// setPan
+//---------------------------------------------------------
+
+void AudioTrack::setGain(double val)
+ {
+ _gain = val;
+ }
+
+//---------------------------------------------------------
// pluginCtrlVal
//---------------------------------------------------------
@@ -1084,6 +1104,7 @@ void AudioTrack::writeProperties(int level, Xml& xml) const
xml.intTag(level, "prefader", prefader());
xml.intTag(level, "sendMetronome", sendMetronome());
xml.intTag(level, "automation", int(automationType()));
+ xml.floatTag(level, "gain", _gain);
if (hasAuxSend()) {
int naux = MusEGlobal::song->auxs()->size();
for (int idx = 0; idx < naux; ++idx) {
@@ -1167,6 +1188,8 @@ bool AudioTrack::readProperties(Xml& xml, const QString& tag)
_prefader = xml.parseInt();
else if (tag == "sendMetronome")
_sendMetronome = xml.parseInt();
+ else if (tag == "gain")
+ _gain = xml.parseFloat();
else if (tag == "automation")
setAutomationType(AutomationType(xml.parseInt()));
else if (tag == "controller") {