decoder/gme: provide the TRACK tag

This commit is contained in:
Max Kellermann 2016-11-22 12:19:37 +01:00
parent a303639c9e
commit 228cdbe6af
2 changed files with 7 additions and 0 deletions

1
NEWS
View File

@ -21,6 +21,7 @@ ver 0.20 (not yet released)
- ffmpeg: support ReplayGain and MixRamp - ffmpeg: support ReplayGain and MixRamp
- ffmpeg: support stream tags - ffmpeg: support stream tags
- gme: add option "accuracy" - gme: add option "accuracy"
- gme: provide the TRACK tag
- gme: faster scanning - gme: faster scanning
- mad: reduce memory usage while scanning tags - mad: reduce memory usage while scanning tags
- mpcdec: read the bit rate - mpcdec: read the bit rate

View File

@ -221,6 +221,12 @@ ScanGmeInfo(const gme_info_t &info, unsigned song_num, int track_count,
tag_handler_invoke_duration(handler, handler_ctx, tag_handler_invoke_duration(handler, handler_ctx,
SongTime::FromMS(info.play_length)); SongTime::FromMS(info.play_length));
if (track_count > 1) {
char track[16];
sprintf(track, "%u", song_num + 1);
tag_handler_invoke_tag(handler, handler_ctx, TAG_TRACK, track);
}
if (info.song != nullptr) { if (info.song != nullptr) {
if (track_count > 1) { if (track_count > 1) {
/* start numbering subtunes from 1 */ /* start numbering subtunes from 1 */