Mercurial > hg > svcore
comparison 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 |
comparison
equal
deleted
inserted
replaced
1750:d0ef65d8dd89 | 1751:77543124651b |
---|---|
17 | 17 |
18 #include "ReadOnlyWaveFileModel.h" | 18 #include "ReadOnlyWaveFileModel.h" |
19 | 19 |
20 #include "base/TempDirectory.h" | 20 #include "base/TempDirectory.h" |
21 #include "base/Exceptions.h" | 21 #include "base/Exceptions.h" |
22 #include "base/PlayParameterRepository.h" | |
22 | 23 |
23 #include "fileio/WavFileWriter.h" | 24 #include "fileio/WavFileWriter.h" |
24 #include "fileio/WavFileReader.h" | 25 #include "fileio/WavFileReader.h" |
25 | 26 |
26 #include <QDir> | 27 #include <QDir> |
158 m_model->setStartFrame(m_startFrame); | 159 m_model->setStartFrame(m_startFrame); |
159 | 160 |
160 connect(m_model, SIGNAL(modelChanged()), this, SIGNAL(modelChanged())); | 161 connect(m_model, SIGNAL(modelChanged()), this, SIGNAL(modelChanged())); |
161 connect(m_model, SIGNAL(modelChangedWithin(sv_frame_t, sv_frame_t)), | 162 connect(m_model, SIGNAL(modelChangedWithin(sv_frame_t, sv_frame_t)), |
162 this, SIGNAL(modelChangedWithin(sv_frame_t, sv_frame_t))); | 163 this, SIGNAL(modelChangedWithin(sv_frame_t, sv_frame_t))); |
164 | |
165 PlayParameterRepository::getInstance()->addPlayable | |
166 (getId().untyped, this); | |
163 } | 167 } |
164 | 168 |
165 WritableWaveFileModel::~WritableWaveFileModel() | 169 WritableWaveFileModel::~WritableWaveFileModel() |
166 { | 170 { |
171 PlayParameterRepository::getInstance()->removePlayable | |
172 (getId().untyped); | |
173 | |
167 delete m_model; | 174 delete m_model; |
168 delete m_targetWriter; | 175 delete m_targetWriter; |
169 delete m_temporaryWriter; | 176 delete m_temporaryWriter; |
170 delete m_reader; | 177 delete m_reader; |
171 } | 178 } |