-
-
Notifications
You must be signed in to change notification settings - Fork 21.4k
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
ResourceImporterWAV: Enable QOA compression by default #95815
Conversation
Do you know what features aren't supported? Are they anything that Godot users could be relying on? I'm just trying to figure out if this is technically a compatibility breaking PR. A change in quality vs. size is fine, but if it breaks scripts, or a feature stops working, then we would need to discuss |
This merely changes an import option default to another value. The only situations I can see this "breaking" is if the user:
Then one of the options below:
For both, users would need to change the compress mode from QOA to Disabled.
|
Thank you for clarifying! It sounds like this PR does break compatibility. But only in one particular case that is likely rare. |
Can't comment on the specific line for some reason, but I believe that we should highlight QOA compression being the default in the description. The change would make it a bit unorthodox, since the default would not be the first option out of the 3. |
I wouldn't consider this, since the exact same "breakage" can be currently achieved by changing the import params from Disabled to QOA. Existing projects with already imported WAV files don't get affected at all. |
Not every importer has all the default options on the first. A good example of this is fonts: all of its import options with dropdowns (Antialiasing, Hinting and Subpixel Positioning) have the second option as default. |
I'm neutral on whether this is a good idea. On one hand, it'll reduce exported project install sizes a bit, but it also means we opt into using lossy compression by default for audio. When importing WAV, you may have the expectation that your audio is lossless by default (unlike Ogg Vorbis and MP3). In a sense, this would be similar to using Lossy compression for images by default. We only use lossy VRAM compression for textures detected to be used in 3D by default, not 2D images which are typically used for UI. |
I decided to check what other engines do with WAV files, and the most significant ones seem to use some type of compression by default (load-time Vorbis decompression in Unity's case, and the proprietary Bink Audio format in Unreal). Before QOA was added, Godot didn't have a way to compress WAV files other than IMA-ADPCM, which greatly degrades sound quality and misses a few features (such as seeking, backward playback and resampling, all supported by QOA). Personally, I think the usage of an optimal/compressed option like QOA should be encouraged. The option to disable compression remains there. |
I just double checked and it appears that .import files save all properties which means you are right and this will just change behaviour for new files. In which case it won't break compatibility. |
I agree with this. BTW the current description is a bit misleading, as it describes WAV as an uncompressed format but we're now compressing it by default:
(Also note the capital "S" type at "deviceS", also worth fixing.) |
It seems all the other audio I added a note to that description to explain that it will be compressed on import. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IMO this is worth a try now. IIRC we discussed doing this back when reviewing #91014, and opted to make it opt-in initially for 4.3, and consider making it default later. Later can be now :) and we have the whole 4.4 cycle to find whether this causes issues for some users and reconsider if need be.
Could be good to have some metrics on how this actually affects project size and playback latency and quality on a WAV heavy project.
Rebased on top of master after recent merges. |
Thanks! |
Modifies ResourceImporterWAV's compression mode to use QOA as default instead of disabling.
QOA is lightweight, has a reasonable quality and supports almost every significant feature of AudioStreamWAV that is used on imported audio files, so I think it's a good idea to leave it enabled by default.