plicatibu Posted November 24, 2013 Share Posted November 24, 2013 I see people talking about problem to play audio. More specifically, each platform supports some audio formats but doesn't support others. I suppose that wav file format is supported in the majority of the platforms. Is there any problem to stick with wav file format and forget about the others? Quote Link to comment Share on other sites More sharing options...
Antylum Posted November 24, 2013 Share Posted November 24, 2013 It's not the best choice, if you have a lot of sounds. Cause 1 .wav file can be bigger, than 1 .ogg + 1 .m4a, which are enough for all browsers. Quote Link to comment Share on other sites More sharing options...
rich Posted November 24, 2013 Share Posted November 24, 2013 It depends on the sounds. For short high-fidelity sound effects I find wav an excellent choice, for music it's terrible (due to file size). Quote Link to comment Share on other sites More sharing options...
ResonantCraft Posted December 4, 2013 Share Posted December 4, 2013 Even for sound effects, with the low cut you get from phone speakers, the difference between a compressed file and its wav counterpart is pretty slim. With my teammates, we go ogg/m4a @96kbps all the way, and it works well for mobile devices. Good luck,Nathan Quote Link to comment Share on other sites More sharing options...
mwatt Posted December 4, 2013 Share Posted December 4, 2013 The closest thing to a "universal", multi-purpose format across browsers seems to be mp3. Even Firefox supports it now (unless you have an Enterprise version at work, which is about a year behind the latest). File size on mp3 is smaller than wave, but sound quality may not be as good. For just plain old sounds, I find mp3 to be a good choice. The biggest "knock" on mp3 is that there are still some live patents on it and at least one company is trying to enforce them. However, the last of these patents is due to run out shortly... something like 2015. Unless you are selling very high volumes of games I doubt there is much to worry about now - and fairly soon, there should not be an issue at all. Patent extensions are possible but I believe the ones still active have already been extended once. My take is that mp3 will become the defacto standard. Ogg seems to be a good technical solution, but does not enjoy as wide a support as mp3. If anyone's views conflict with my statements I'd love to hear about it - if a correction is in order I need to hear it. Quote Link to comment Share on other sites More sharing options...
alex_h Posted December 4, 2013 Share Posted December 4, 2013 One possible issue with mp3 is that it adds a tiny bit of silence to the start of your files. If you are using individual files for each sound and you want any of them to loop seamlessly then this will be a problem. Other formats like ogg and m4a don't suffer from this glitch. I guess really you should use one big audio sprite for all your sounds though, in which case this is a non-issue. Quote Link to comment Share on other sites More sharing options...
plicatibu Posted December 4, 2013 Author Share Posted December 4, 2013 I thought that .wav file format was the one supported by all browsers. Not the mp3. The closest thing to a "universal", multi-purpose format across browsers seems to be mp3. Quote Link to comment Share on other sites More sharing options...
rich Posted December 4, 2013 Share Posted December 4, 2013 Both WAV and MP3 formats are really just umbrellas, there are masses of different codecs that can exist within them, each with their own quirks and issues. Not all MP3s are created equal I agree with plicatibu though, I always thought that WAV was the most universally adopted format too. It also has next to zero latency, so is perfect for sound effects that you need to fire quickly. Quote Link to comment Share on other sites More sharing options...
mwatt Posted December 5, 2013 Share Posted December 5, 2013 Appreciate the feed back. I kind of bungled what I was trying to say about the mp3 being the most "universal". I was intending to mean universal in two senses:1. Works in many places.2. Best general applicability of a format that works in many places. My understanding was that wav files are just two big for general usage. However, maybe I'll take another look if mp3 usage results in an extra small gap in time before the sound is heard - that is very important to me. I should say also that for my own purposes, the freedom from worrying about multiple files for each sound was an extravagance I could readily afford and my advice was coming from that frame of mind. However, as has been pointed out, if you are willing to deliver multiple formats then you will have a more capable solution for your extra trouble. Quote Link to comment Share on other sites More sharing options...
rich Posted December 5, 2013 Share Posted December 5, 2013 I wouldn't use wavs for music because, as you pointed out, they're just too large. But for sound effects I generally find them excellent. Quote Link to comment Share on other sites More sharing options...
alex_h Posted December 5, 2013 Share Posted December 5, 2013 I'm surprised to see latency come up as an issue in the discussion. Surely the latency incurred with a compressed format is simply the time it takes to decompress the audio data before using it. But once it has been decompressed into RAM there is no further difference between using that or wav format audio is there? Its all just audio sample data from that point on so neither should have more latency than the other. Same as loading a compressed image format, the data in the jpg or png file on disk is compressed but in order to use it you decompress it in RAM into uncompressed bitmap data format, from which point there is no further difference in usage between one format and another. Or maybe I am just plain wrong? (wouldn't be the first time! ) Quote Link to comment Share on other sites More sharing options...
rich Posted December 5, 2013 Share Posted December 5, 2013 When I use that word I mean it in both the sense of the initial decompression hit, but also the start-up time involved in playing the sound. This is why it's such a pain in the butt to loop mp3s seamlessly: http://www.compuphase.com/mp3/mp3loops.htm and http://gamua.com/blog/2012/05/gapless-mp3-audio-on-ios/ do a great job of explaining it well. tackle 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.