diff audioio/ClipMixer.cpp @ 349:8d7f39df44ed tony_integration

Quieter clip playback for note layers
author Chris Cannam
date Thu, 08 May 2014 15:04:42 +0100
parents a4b8f0864835
children 0876ea394902
line wrap: on
line diff
--- a/audioio/ClipMixer.cpp	Wed May 07 16:51:04 2014 +0100
+++ b/audioio/ClipMixer.cpp	Thu May 08 15:04:42 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;
 	}
     }