monkey icon indicating copy to clipboard operation
monkey copied to clipboard

Metadata for sound files in HTML5 target

Open devolonter opened this issue 11 years ago • 2 comments

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.

devolonter avatar Jan 18 '14 20:01 devolonter

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'.

blitz-research avatar Mar 09 '14 22:03 blitz-research

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.

devolonter avatar Mar 10 '14 14:03 devolonter