Mercurial > hg > svcore
diff data/model/WritableWaveFileModel.h @ 1124:efea94b04d5a 3.0-integration
Merge from branch recording
author | Chris Cannam |
---|---|
date | Thu, 20 Aug 2015 13:15:19 +0100 |
parents | 4d9816ba0ebe b9faee02afa5 |
children | e994747fb9dd |
line wrap: on
line diff
--- a/data/model/WritableWaveFileModel.h Tue Aug 04 16:39:40 2015 +0100 +++ b/data/model/WritableWaveFileModel.h Thu Aug 20 13:15:19 2015 +0100 @@ -13,15 +13,17 @@ COPYING included with this distribution for more information. */ -#ifndef _WRITABLE_WAVE_FILE_MODEL_H_ -#define _WRITABLE_WAVE_FILE_MODEL_H_ +#ifndef WRITABLE_WAVE_FILE_MODEL_H +#define WRITABLE_WAVE_FILE_MODEL_H #include "WaveFileModel.h" +#include "ReadOnlyWaveFileModel.h" +#include "PowerOfSqrtTwoZoomConstraint.h" class WavFileWriter; class WavFileReader; -class WritableWaveFileModel : public RangeSummarisableTimeValueModel +class WritableWaveFileModel : public WaveFileModel { Q_OBJECT @@ -51,6 +53,20 @@ sv_frame_t getFrameCount() const; int getChannelCount() const { return m_channels; } sv_samplerate_t getSampleRate() const { return m_sampleRate; } + sv_samplerate_t getNativeRate() const { return m_sampleRate; } + + QString getTitle() const { + if (m_model) return m_model->getTitle(); + else return ""; + } + QString getMaker() const { + if (m_model) return m_model->getMaker(); + else return ""; + } + QString getLocation() const { + if (m_model) return m_model->getLocation(); + else return ""; + } float getValueMinimum() const { return -1.0f; } float getValueMaximum() const { return 1.0f; } @@ -78,7 +94,7 @@ QString extraAttributes = "") const; protected: - WaveFileModel *m_model; + ReadOnlyWaveFileModel *m_model; WavFileWriter *m_writer; WavFileReader *m_reader; sv_samplerate_t m_sampleRate;