Hello all!
I’m utilizing Cocos Creator model 3.8.3.
The documentation says:
.ogg
is an open supply lossy audio compression format, which has the benefit of supporting multi-channel encoding and utilizing a extra superior acoustic mannequin to cut back the lack of sound high quality, whereas the file measurement is smaller than.mp3
format underneath the identical circumstances. At the moment all of the built-in ringtones for Android additionally use.ogg
recordsdata. This format is just not supported by iOS
I want to draw particular consideration to the next phrase:
I’m a bit confused. There are libraries equivalent to libvorbis and libogg. So I wish to make clear. If I construct the sport for web-mobile and embrace music in ogg format, will it work in iOS browsers? But when I construct it particularly for iOS, it gained’t work?
Supported Audio File and Information Codecs in OS X : Right here is the hyperlink reveals supported audio format in IOS.
IOS doesn’t natively assist the OGG audio format. Which means you can’t straight play OGG recordsdata on iPhones, iPads, or different Apple gadgets utilizing the default Music app or most different media gamers which might be designed to work with iOS’s native capabilities.
Nevertheless, there are workarounds for this limitation:
- Convert OGG to a Supported Format: You may convert OGG recordsdata to a format that iOS does assist, equivalent to MP3 or AAC, utilizing varied audio conversion instruments accessible on-line or as standalone functions.
- Use Third-Occasion Apps: Some third-party apps accessible on the App Retailer could assist OGG playback. These apps implement their very own decoding capabilities and might play OGG recordsdata with out the necessity for conversion.
- Net Audio: For those who’re attempting to play OGG recordsdata inside an internet software on an iOS system, you may encounter limitations resulting from iOS’s restrictions on autoplay and the necessity for person interplay to provoke audio playback.
- Customized Growth: For builders, it’s potential to make use of lower-level APIs like AudioQueue or Audio Toolbox to implement OGG playback in customized apps. This strategy requires understanding of audio programming and the willingness to keep up customized code for audio decoding.
It’s vital to notice that whereas these workarounds can allow OGG playback on iOS, they could not present the identical stage of integration or ease of use as enjoying natively supported audio codecs.
It’s clear that if iOS doesn’t assist it, then those that use the system API is not going to assist it both. My query is just not on the whole, however particularly relating to the Cocos Creator engine model 3.8.3. Does the engine use solely the system API or does it implement ogg playback bypassing the system? For instance, it was potential to make use of libvorbis and libogg.
Nicely, I didn’t perceive concerning the meeting for Net-desktop/cell and subsequent launch within the browser. In that case, it’s higher to overlook concerning the ogg format?
I recommend you to make use of mp3 straight in your case.