Mercurial > hg > svcore
diff 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 |
line wrap: on
line diff
--- a/data/model/WaveFileModel.cpp Wed Nov 07 14:53:12 2007 +0000 +++ b/data/model/WaveFileModel.cpp Fri Nov 09 17:46:58 2007 +0000 @@ -158,6 +158,22 @@ return rate; } +QString +WaveFileModel::getTitle() const +{ + QString title; + if (m_reader) title = m_reader->getTitle(); + if (title == "") title = objectName(); + return title; +} + +QString +WaveFileModel::getMaker() const +{ + if (m_reader) return m_reader->getMaker(); + return ""; +} + size_t WaveFileModel::getData(int channel, size_t start, size_t count, float *buffer) const