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
{{ message }}
Repository navigation
OGGs not obtainable in HTML5 even when converted to MP3 #1215
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() {}
}
Activity
MSGhero commentedon May 26, 2024
OGGs are straight up ignored on HTML5 without stb, and it's intentional. #1152 is slightly related