changeset 164:07d8dac78edc

* Activity log updates * Update range lists in play source when a new model is added * Fill cache with empty background in colour 3d plot
author Chris Cannam
date Fri, 27 Feb 2009 13:33:16 +0000
parents 2c158dd3b983
children 0bd09fb9e584
files audioio/AudioCallbackPlaySource.cpp framework/MainWindowBase.cpp framework/MainWindowBase.h
diffstat 3 files changed, 19 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/audioio/AudioCallbackPlaySource.cpp	Fri Feb 27 12:55:34 2009 +0000
+++ b/audioio/AudioCallbackPlaySource.cpp	Fri Feb 27 13:33:16 2009 +0000
@@ -223,6 +223,8 @@
 	}
     }
 
+    rebuildRangeLists();
+
     m_mutex.unlock();
 
     m_audioGenerator->setTargetChannelCount(getTargetChannelCount());
@@ -285,9 +287,13 @@
     size_t lastEnd = 0;
     for (std::set<Model *>::const_iterator i = m_models.begin();
 	 i != m_models.end(); ++i) {
-//	std::cout << "AudioCallbackPlaySource::removeModel(" << model << "): checking end frame on model " << *i << std::endl;
+#ifdef DEBUG_AUDIO_PLAY_SOURCE
+	std::cout << "AudioCallbackPlaySource::removeModel(" << model << "): checking end frame on model " << *i << std::endl;
+#endif
 	if ((*i)->getEndFrame() > lastEnd) lastEnd = (*i)->getEndFrame();
-//	std::cout << "(done, lastEnd now " << lastEnd << ")" << std::endl;
+#ifdef DEBUG_AUDIO_PLAY_SOURCE
+	std::cout << "(done, lastEnd now " << lastEnd << ")" << std::endl;
+#endif
     }
     m_lastModelEndFrame = lastEnd;
 
--- a/framework/MainWindowBase.cpp	Fri Feb 27 12:55:34 2009 +0000
+++ b/framework/MainWindowBase.cpp	Fri Feb 27 13:33:16 2009 +0000
@@ -1026,6 +1026,8 @@
         mode = ReplaceMainModel;
     }
 
+    emit activity(tr("Import audio file \"%1\"").arg(source.getLocation()));
+
     if (mode == ReplaceMainModel) {
 
         Model *prevMain = getMainModel();
@@ -1244,6 +1246,8 @@
             return FileOpenFailed;
         }
 
+        emit activity(tr("Import layer XML file \"%1\"").arg(source.getLocation()));
+
         m_recentFiles.addFile(source.getLocation());
 
         if (!source.isRemote()) {
@@ -1275,6 +1279,8 @@
 
                 std::cerr << "MainWindowBase::openLayer: Have model" << std::endl;
 
+                emit activity(tr("Import MIDI file \"%1\"").arg(source.getLocation()));
+
                 Layer *newLayer = m_document->createImportedLayer(model);
 
                 if (newLayer) {
@@ -1453,6 +1459,8 @@
 
     if (ok) {
 
+        emit activity(tr("Import session file \"%1\"").arg(source.getLocation()));
+
 	setWindowTitle(tr("%1: %2")
                        .arg(QApplication::applicationName())
 		       .arg(source.getLocation()));
@@ -1545,6 +1553,8 @@
         return FileOpenFailed;
     }
 
+    emit activity(tr("Import RDF document \"%1\"").arg(source.getLocation()));
+
     std::set<Model *> added;
 
     for (int i = 0; i < models.size(); ++i) {
--- a/framework/MainWindowBase.h	Fri Feb 27 12:55:34 2009 +0000
+++ b/framework/MainWindowBase.h	Fri Feb 27 13:33:16 2009 +0000
@@ -147,6 +147,7 @@
     void canSave(bool);
     void hideSplash();
     void replacedDocument();
+    void activity(QString);
 
 public slots:
     virtual void preferenceChanged(PropertyContainer::PropertyName);