diff audioio/ClipMixer.cpp @ 308:289d65722123 tonioni

More work on mixing and file i/o for sample stuff
author Chris Cannam
date Tue, 07 Jan 2014 15:50:04 +0000
parents 6eb15c3aee0a
children 8c59cc68eabd
line wrap: on
line diff
--- a/audioio/ClipMixer.cpp	Tue Jan 07 13:10:35 2014 +0000
+++ b/audioio/ClipMixer.cpp	Tue Jan 07 15:50:04 2014 +0000
@@ -32,6 +32,12 @@
     delete[] m_clipData;
 }
 
+void
+ClipMixer::setChannelCount(int channels)
+{
+    m_channels = channels;
+}
+
 bool
 ClipMixer::loadClipData(QString path, float f0)
 {
@@ -49,8 +55,8 @@
     info.format = 0;
     file = sf_open(path.toLocal8Bit().data(), SFM_READ, &info);
     if (!file) {
-	cerr << "ClipMixer::loadClipData: Failed to open file "
-             << path << ": " << sf_strerror(file) << endl;
+	cerr << "ClipMixer::loadClipData: Failed to open file path \""
+             << path << "\": " << sf_strerror(file) << endl;
 	return false;
     }
 
@@ -86,7 +92,14 @@
 }
 
 void
+ClipMixer::reset()
+{
+    //!!!
+}
+
+void
 ClipMixer::mix(float **toBuffers, 
+               float gain,
                std::vector<NoteStart> newNotes, 
                std::vector<NoteEnd> endingNotes)
 {