Skip to content

AudioStreamWAV: Place tag reading code together#115534

Open
DeeJayLSP wants to merge 1 commit into
godotengine:masterfrom
DeeJayLSP:wav-tags-together
Open

AudioStreamWAV: Place tag reading code together#115534
DeeJayLSP wants to merge 1 commit into
godotengine:masterfrom
DeeJayLSP:wav-tags-together

Conversation

@DeeJayLSP

@DeeJayLSP DeeJayLSP commented Jan 28, 2026

Copy link
Copy Markdown
Contributor

One thing that bothers me in audio_stream_wav.cpp (which is already messy) is how the code for reading tags is scattered:

  1. Fill a hashmap with raw tags found in the file.
  2. Near the end of the loading code after all conversions, if tags were found, make another hashmap with "remaps".
  3. Use the remaps to fill a dictionary containing the tags.
  4. Set the tags.

This changes the code to:

  1. Once we know the file has tags (INFO list found), make the remaps.
  2. For each tag found, immediately use the remap and put it into the dictionary.
  3. Set the tags at the end.

Basically, all tag reading and parsing code is now in one place rather than having parts scattered.

This is one of many PRs I avoided making due to optimism about #96545. I also consider this a requirement for a post-#116184 to add AIFF metadata support, as the current way hardcodes for WAV tags and would need workarounds.

@DeeJayLSP DeeJayLSP force-pushed the wav-tags-together branch from 79948bc to deac815 Compare April 4, 2026 14:58
@github-project-automation github-project-automation Bot moved this to For team assessment in Audio Issue Triage May 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: For team assessment

Development

Successfully merging this pull request may close these issues.

3 participants