comparison data/fileio/OggVorbisFileReader.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 b92513201610
comparison
equal deleted inserted replaced
332:13e5870040e6 333:1afaf98dbf11
171 void *data) 171 void *data)
172 { 172 {
173 OggVorbisFileReader *reader = (OggVorbisFileReader *)data; 173 OggVorbisFileReader *reader = (OggVorbisFileReader *)data;
174 174
175 if (!reader->m_commentsRead) { 175 if (!reader->m_commentsRead) {
176 const FishSoundComment *comment = fish_sound_comment_first_byname 176 {
177 (fs, "TITLE"); 177 const FishSoundComment *comment = fish_sound_comment_first_byname
178 if (comment && comment->value) { 178 (fs, "TITLE");
179 reader->m_title = QString::fromUtf8(comment->value); 179 if (comment && comment->value) {
180 reader->m_title = QString::fromUtf8(comment->value);
181 }
182 }
183 {
184 const FishSoundComment *comment = fish_sound_comment_first_byname
185 (fs, "ARTIST");
186 if (comment && comment->value) {
187 reader->m_maker = QString::fromUtf8(comment->value);
188 }
180 } 189 }
181 reader->m_commentsRead = true; 190 reader->m_commentsRead = true;
182 } 191 }
183 192
184 if (reader->m_channelCount == 0) { 193 if (reader->m_channelCount == 0) {