comparison data/model/WaveFileModel.cpp @ 333:1afaf98dbf11

* Factor out uses of "Sonic Visualiser" in "common" code to applicationName() * Add ability to show work title + artist in top-left of pane (thinking of Vect but may be useful in SV in future) * A few other generalisations useful for Vect
author Chris Cannam
date Fri, 09 Nov 2007 17:46:58 +0000
parents 1d656dcda8ef
children 700cd3350391 6f6ab834449d
comparison
equal deleted inserted replaced
332:13e5870040e6 333:1afaf98dbf11
156 size_t rate = m_reader->getNativeRate(); 156 size_t rate = m_reader->getNativeRate();
157 if (rate == 0) rate = getSampleRate(); 157 if (rate == 0) rate = getSampleRate();
158 return rate; 158 return rate;
159 } 159 }
160 160
161 QString
162 WaveFileModel::getTitle() const
163 {
164 QString title;
165 if (m_reader) title = m_reader->getTitle();
166 if (title == "") title = objectName();
167 return title;
168 }
169
170 QString
171 WaveFileModel::getMaker() const
172 {
173 if (m_reader) return m_reader->getMaker();
174 return "";
175 }
176
161 size_t 177 size_t
162 WaveFileModel::getData(int channel, size_t start, size_t count, 178 WaveFileModel::getData(int channel, size_t start, size_t count,
163 float *buffer) const 179 float *buffer) const
164 { 180 {
165 // Always read these directly from the file. 181 // Always read these directly from the file.