comparison data/fileio/OggVorbisFileReader.cpp @ 633:7feec7756b41

* Bit more work on track composer identification
author Chris Cannam
date Mon, 22 Mar 2010 16:41:01 +0000
parents 3e139b2dfe5e
children 773fc0e43feb
comparison
equal deleted inserted replaced
632:a4b8ad0f1a8f 633:7feec7756b41
169 void *data) 169 void *data)
170 { 170 {
171 OggVorbisFileReader *reader = (OggVorbisFileReader *)data; 171 OggVorbisFileReader *reader = (OggVorbisFileReader *)data;
172 172
173 if (!reader->m_commentsRead) { 173 if (!reader->m_commentsRead) {
174 { 174 const FishSoundComment *comment;
175 const FishSoundComment *comment = fish_sound_comment_first_byname 175 comment = fish_sound_comment_first_byname(fs, "TITLE");
176 (fs, "TITLE"); 176 if (comment && comment->value) {
177 if (comment && comment->value) { 177 reader->m_title = QString::fromUtf8(comment->value);
178 reader->m_title = QString::fromUtf8(comment->value); 178 }
179 } 179 comment = fish_sound_comment_first_byname(fs, "ARTIST");
180 } 180 if (comment && comment->value) {
181 { 181 reader->m_maker = QString::fromUtf8(comment->value);
182 const FishSoundComment *comment = fish_sound_comment_first_byname 182 }
183 (fs, "ARTIST"); 183 comment = fish_sound_comment_first(fs);
184 if (comment && comment->value) { 184 while (comment) {
185 reader->m_maker = QString::fromUtf8(comment->value); 185 reader->m_tags[QString::fromUtf8(comment->name)] =
186 } 186 QString::fromUtf8(comment->value);
187 comment = fish_sound_comment_next(fs, comment);
187 } 188 }
188 reader->m_commentsRead = true; 189 reader->m_commentsRead = true;
189 } 190 }
190 191
191 if (reader->m_channelCount == 0) { 192 if (reader->m_channelCount == 0) {