Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WAV importer doesn't support Loop Modes #40359

Closed
WiggleWizard opened this issue Jul 14, 2020 · 3 comments
Closed

WAV importer doesn't support Loop Modes #40359

WiggleWizard opened this issue Jul 14, 2020 · 3 comments

Comments

@WiggleWizard
Copy link
Contributor

Godot version:
3.2.1.stable.official
Checked 3.2 and master, both contain the issue.

OS/device including version:
Not OS specific.

Issue description:
I was kinda hoping that audio would have the possibility to play in reverse. However there's no exposed GDScript way to achieve that. So as a workaround I attempted to move the playhead around beyond the loop marker and set the AudioStreamSample Loop Mode to "Ping-Pong" to hopefully achieve the same effect. I found that didn't work, I then realized that looping in an exported game will only loop forwards but in the editor it loops in the way I select.

This lead me to the import properties of the WAV file in question and found there's no supporting "Loop Mode" option in the import dialog to support the AudioStreamSample resource mapping. Naturally this results in the developer being artificially limited to Disabled and Forward loop modes.

image

Steps to reproduce:

  1. Import a WAV file with loop on.
  2. Put loop mode in resulting AudioStreamSample to "Ping-Pong".
  3. Re-select the AudioStreamSample. Watch "Loop Mode" get reset to "Forward".

Code area
https://github.com/godotengine/godot/blob/3.2/editor/import/resource_importer_wav.cpp#L88. Either the loop property needs to be changed to loop_mode with the appropriate enum, or a loop_mode property should be added.

@akien-mga
Copy link
Member

Loop mode is a property of WAV files and is thudnhardcoded in the file.

If you want to override it, edit the WAV file's metadata, or save the imported version as a .tres file and edit properties.

@WiggleWizard
Copy link
Contributor Author

WiggleWizard commented Jul 15, 2020

It should be clear that you need to mod the WAV metadata or converting through importing as a .tres file imho. Perhaps that's the work that needs to be done?

Personally it would be really great if the general agreement was to just add the ability to modify the loop_mode upon import. It works fine in the editor, don't see why it wouldn't work fine in an export.

@KoBeWi
Copy link
Member

KoBeWi commented May 3, 2022

Seems implemented in 3.5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants