简体   繁体   中英

Play .ogg file with SDL_mixer in Edge and Safari (emscripten)

I've created a program, which uses (SDL2) SDL_mixer to play .ogg sound files.

It works in Chrome, Firefox and Opera. But it is not working in MS Edge, and Safari, because the lack of ogg sound support.

I've added this command to the emcc , which should fix this issue:

-s USE_OGG=1

But it is still not working.

How is it possible to make .ogg sound files work in Edge (and Safari)?

You can't.

At the moment of this writing, both Safari and MS Edge won't support .ogg , as you mentioned.

Since Emscripten compiles to JavaScript, you'd better find a way to make you code accept another audio extension (fallback) supported by Safari and MS Edge, such as .mp3 or .m4a AAC (which is an audio component of mp4).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM