-
Notifications
You must be signed in to change notification settings - Fork 448
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
Automatically append file extension to sound asset ids #3314
Conversation
Does it make sense to limit to only mp3, wav and ogg? On web, audio format support is limited by the browser so it supports a lot more than just those 3 |
do you have examples? |
For file formats? Off the top of my head m4a/aac, flac and ogg/opus |
@ACrazyTown The main reason this exists is because OGG is not supported on all browsers (glares intently at Safari) and because MP3 is not supported on desktop (for some reason). This is a very useful PR as is, considering I manually do something similar on multiple projects. |
I think you misread ACrazyTown's message. They weren't questioning why this exists, just why it only allowed 3 values, so I made this change |
Define flag FLX_DEFAULT_SOUND_EXT to allow sound asset ids to omit the extension. Useful when targeting multiple platforms that use different sound files. Can also use the flag to determine the desired sound extension, setting the flags value to "mp3" "wav" or "ogg" will use that extension. The default extension can be read via
FlxG.assets.defaultSoundExtension