Mercurial > hg > svapp
diff audioio/ClipMixer.cpp @ 351:36efd75d7b7b tonioni
Merge from default branch
author | Chris Cannam |
---|---|
date | Wed, 14 May 2014 09:58:27 +0100 |
parents | 8d7f39df44ed |
children | 0876ea394902 |
line wrap: on
line diff
--- a/audioio/ClipMixer.cpp Thu Apr 03 08:51:30 2014 +0100 +++ b/audioio/ClipMixer.cpp Wed May 14 09:58:27 2014 +0100 @@ -40,7 +40,7 @@ } bool -ClipMixer::loadClipData(QString path, float f0) +ClipMixer::loadClipData(QString path, float f0, float level) { if (m_clipData) { cerr << "ClipMixer::loadClipData: Already have clip loaded" << endl; @@ -81,7 +81,7 @@ int j; m_clipData[i] = 0.0f; for (j = 0; j < info.channels; ++j) { - m_clipData[i] += tmpFrames[i * info.channels + j]; + m_clipData[i] += tmpFrames[i * info.channels + j] * level; } } @@ -135,7 +135,7 @@ foreach (NoteStart note, m_playing) { for (int c = 0; c < m_channels; ++c) { - levels[c] = gain; + levels[c] = note.level * gain; } if (note.pan != 0.0 && m_channels == 2) { levels[0] *= 1.0 - note.pan;