diff data/model/WritableWaveFileModel.cpp @ 1751:77543124651b by-id

Overhaul PlayParameters bits
author Chris Cannam
date Thu, 04 Jul 2019 18:04:21 +0100
parents 52705a328b34
children 6d09d68165a4
line wrap: on
line diff
--- a/data/model/WritableWaveFileModel.cpp	Thu Jul 04 14:30:48 2019 +0100
+++ b/data/model/WritableWaveFileModel.cpp	Thu Jul 04 18:04:21 2019 +0100
@@ -19,6 +19,7 @@
 
 #include "base/TempDirectory.h"
 #include "base/Exceptions.h"
+#include "base/PlayParameterRepository.h"
 
 #include "fileio/WavFileWriter.h"
 #include "fileio/WavFileReader.h"
@@ -160,10 +161,16 @@
     connect(m_model, SIGNAL(modelChanged()), this, SIGNAL(modelChanged()));
     connect(m_model, SIGNAL(modelChangedWithin(sv_frame_t, sv_frame_t)),
             this, SIGNAL(modelChangedWithin(sv_frame_t, sv_frame_t)));
+    
+    PlayParameterRepository::getInstance()->addPlayable
+        (getId().untyped, this);
 }
 
 WritableWaveFileModel::~WritableWaveFileModel()
 {
+    PlayParameterRepository::getInstance()->removePlayable
+        (getId().untyped);
+    
     delete m_model;
     delete m_targetWriter;
     delete m_temporaryWriter;