-
Notifications
You must be signed in to change notification settings - Fork 7.1k
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
AudioEngine::preload should support to pass a url vector as parameter #16085
Comments
Sounds good. |
@dumganhar Something like that: |
I think the best way is that creating a audioManager according to your needs. /**
A base audio class don't need too much extra function, because is not everyone has the same requirements as you. Thanks. |
@liuyi if i understand correctly, you disagreed @Drakon-Cocos 's requirement, not this issue. Right? If so, i agree with you. |
@minggo Yes, I have different opinion。 Just keep it simple! |
@liuyi |
@Drakon-Cocos 1、Put whole sounds to a folder in res folder. resource.js example: "voice": {
I think this way is faster than scanning folder. Here is a nodeJS code snippets, I use it generate resource list: `
};` |
Agree with @liuyi, i think it better to keep AudioManager simple. Adding multiple files can be done inside for-loop. Preloading sounds from directories have one big disadvantage - obtaining files list may be very slow on some platforms (e.g. on Android). |
Now we only support:
If there're lots of effect files need to be preloaded, developer has to invoke
preload
function many times, and must pay more attention tocallback
function.Probably, a new interface like:
Any thoughts?
@minggo
The text was updated successfully, but these errors were encountered: