You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I wrote a custom converter to convert ogg files to mp3, since oggs are not natively supported on HTML5. However, whenever I build the project for HTML5, the resources are not obtainable even though they should have been converted to mp3 files. This is fixed by including the stb_ogg_sound library, in which case the sound files will be obtainable and be converted to mp3 files, but it's a little inconvenient that I have to include that library even though in the end there should be no ogg file processing.
This is the code for my converter:
packageconvert;
classConvertOgg2Mp3extendshxd.fs.Convert {
functionnew() {
super("ogg", "mp3");
}
overridefunctionconvert() {
varcmd="ffmpeg";
varargs= ["-hide_banner", "-loglevel", "error", "-i", srcPath, "-ar", "44100", dstPath];
command(cmd, args);
}
// register the convert so that it can be foundstaticvar_=hxd.fs.Convert.register(newConvertOgg2Mp3());
// used for macro compilationpublicstaticfunctiondoNothing() {}
}
I wrote a custom converter to convert ogg files to mp3, since oggs are not natively supported on HTML5. However, whenever I build the project for HTML5, the resources are not obtainable even though they should have been converted to mp3 files. This is fixed by including the stb_ogg_sound library, in which case the sound files will be obtainable and be converted to mp3 files, but it's a little inconvenient that I have to include that library even though in the end there should be no ogg file processing.
This is the code for my converter:
And this is my build.hxml
The text was updated successfully, but these errors were encountered: