Skip to content
This repository was archived by the owner on Nov 4, 2023. It is now read-only.

Conversation

@devolonter
Copy link
Contributor

Metadata allows to define whether file exists or not without an attempt to load it. So LoadSound and PlayMusic functions will be able to return valid values like other targets.

@blitz-research
Copy link
Owner

Ok, I've manually added the async sound loader code - thanks!

However, I think the LoadSample fix will break code that tries to load stuff outside of monkey://data/, eg: stuff with an 'absolute' URL so I've skipped all the audio meta data changes.

Also, I'm not sure if it's a good idea to just specify 'audio' for the meta data type for all audio. If anything, I think I'd prefer having separate meta data types for sound/music.

Doesn't make much difference here since everything is an audio() object, but I'm working on a version of mojo audio that uses the new webaudio for sounds, but old audio() for music, in which case if there was a need to reference meta data it might be nice to be able to do it 'by usage'.

@devolonter
Copy link
Contributor Author

I’ve pushed fix for loading sample outside monkey://data, if you return to this pull request. I think we will have some issues with separate meta data for sound and music, because it will be difficult to define some generic file filter for it. However, I'll looking forward for your solution.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants