Skip to content

Commit 94fdfac

Browse files
committed
Make WAV metadata tag mappings more consistent with Vorbis
1 parent e67074d commit 94fdfac

File tree

1 file changed

+16
-3
lines changed

1 file changed

+16
-3
lines changed

scene/resources/audio_stream_wav.cpp

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1153,22 +1153,35 @@ Ref<AudioStreamWAV> AudioStreamWAV::load_from_buffer(const Vector<uint8_t> &p_st
11531153
if (!tag_map.is_empty()) {
11541154
// Used to make the metadata tags more unified across different AudioStreams.
11551155
// See https://www.recordingblogs.com/wiki/list-chunk-of-a-wave-file
1156+
// https://wiki.hydrogenaudio.org/index.php?title=Tag_Mapping#Mapping_Tables
11561157
HashMap<String, String> tag_id_remaps;
11571158
tag_id_remaps.reserve(15);
11581159
tag_id_remaps["IARL"] = "location";
11591160
tag_id_remaps["IART"] = "artist";
11601161
tag_id_remaps["ICMS"] = "organization";
1161-
tag_id_remaps["ICMT"] = "comments";
1162+
tag_id_remaps["ICMT"] = "comment";
1163+
tag_id_remaps["ICNT"] = "releasecountry";
11621164
tag_id_remaps["ICOP"] = "copyright";
11631165
tag_id_remaps["ICRD"] = "date";
1166+
tag_id_remaps["IENC"] = "encodedby";
1167+
tag_id_remaps["IENG"] = "engineer";
1168+
tag_id_remaps["IFRM"] = "tracktotal";
11641169
tag_id_remaps["IGNR"] = "genre";
11651170
tag_id_remaps["IKEY"] = "keywords";
1166-
tag_id_remaps["IMED"] = "medium";
1171+
tag_id_remaps["ILNG"] = "language";
1172+
tag_id_remaps["IMED"] = "media";
1173+
tag_id_remaps["IMUS"] = "composer";
11671174
tag_id_remaps["INAM"] = "title";
11681175
tag_id_remaps["IPRD"] = "album";
1176+
tag_id_remaps["IPRO"] = "producer";
1177+
tag_id_remaps["IPRT"] = "tracknumber";
11691178
tag_id_remaps["ISBJ"] = "description";
1170-
tag_id_remaps["ISFT"] = "software";
1179+
tag_id_remaps["ISFT"] = "encoder";
1180+
tag_id_remaps["ISRF"] = "media";
1181+
tag_id_remaps["ITCH"] = "encodedby";
11711182
tag_id_remaps["ITRK"] = "tracknumber";
1183+
tag_id_remaps["IWRI"] = "author";
1184+
tag_id_remaps["TLEN"] = "length";
11721185
Dictionary tag_dictionary;
11731186
for (const KeyValue<String, String> &E : tag_map) {
11741187
HashMap<String, String>::ConstIterator remap = tag_id_remaps.find(E.key);

0 commit comments

Comments
 (0)