Survey - Audio file format

I am wondering how everyone is handling their audio file formats and sizes? I have alot of .WAV files in my current app and working on building an update that will surely double my amount of audio file “space”. Currently my audio takes up about 14mb of my total app size. In order to be able to build across ALL devices (iOS & Android) I have only been successful in making .WAV files run/play.

I have been using Audacity to process all of my files. Does any one know of anything better? Is there anything out there that can reduce/compress the .WAVs down at all?

All my files are:

.WAV
Mono
16-bit
22050 Hz

Is this something we just have to deal with until the Android Audio get better?

I have spent the better part of three days trying to find a better solution. I have read all the Corona Docs etc. If anyone can possibly shed some light on this subject it would be greatly appreciated.

Thx
Rob [import]uid: 16527 topic_id: 22341 reply_id: 322341[/import]

Android and iOS should both support MP3, which is smaller than WAV - have you tried MP3 on Android?

I am not the most experienced with Android but I remember notes from some time back saying MP3 did become supported. [import]uid: 52491 topic_id: 22341 reply_id: 89044[/import]

In booty cove I used .ogg file with success on android. Still trying to figure out what file format I should use for iOs because .aac are kinda lagging on pre 3g device for me … [import]uid: 64835 topic_id: 22341 reply_id: 89077[/import]

Thanks for the idea Peach; but don’t we have to worry about the Licensing with regards to using the .MP3 file format.

I have looked for information regarding the license and there are big fees if you want to use it commercially.

Is anyone using .MP3 within there paid apps?

[import]uid: 16527 topic_id: 22341 reply_id: 89093[/import]

From what I can see from:
http://mp3licensing.com/royalty/software.html
It is: 0.75$ by unit sold.

Pretty expensive ! for that reason I’m calling musicplayer.play(“songname”) and my musicplayer class deal with adding either .aac or .ogg.

I just drop the right musicplayer with the correct music file at the time of build it pretty fast and worth saving .75$ for about 30 sec additional time by build. [import]uid: 64835 topic_id: 22341 reply_id: 89101[/import]

@fstrudelbenoit - What software are you using to create the .ogg files? Also, would you mind sharing the file parameters?

Thanks
Rob
[import]uid: 16527 topic_id: 22341 reply_id: 89103[/import]

For a 1:40 file it about 2.3 meg at 196 kbs 44.1 khz running with loadstream.

The software he used for encoding: ACE-HIGH to convert to .ogg from a wav file.

If anyone has the right setting for pre 3gs iPhone for .aac file please share :slight_smile:

Thanks, [import]uid: 64835 topic_id: 22341 reply_id: 89105[/import]

Any other thoughts regarding audio out there?
[import]uid: 16527 topic_id: 22341 reply_id: 89418[/import]

Note that the licensing prices linked to above are for adding a decoder/encoder to your app. Presumably, either Corona has paid to add the decoder or is relying on the device’s license.

I think there is more likely the pricing for using the MP3 format for audio files:
http://mp3licensing.com/royalty/games.html

Of course, I do wonder how many companies actually pay. :slight_smile: [import]uid: 17827 topic_id: 22341 reply_id: 89767[/import]

(Not legal advice, just what I think…)

The licensing for decoding of an MP3 has been paid by Apple for use on their device (iPad, iPhone, etc.) Your game is not encoding or decoding MP3, it’s asking the device to play a sound and the device handles that (and it has a license).

Plus, in the FAQ on the mp3licensing site it says this (emphasis added)…

However, no license is needed for private, non-commercial activities (e.g., home-entertainment, receiving broadcasts and creating a personal music library), not generating revenue or other consideration of any kind or for entities with associated annual gross revenue less than US$ 100 000.00.

So my take is that it’s a non-issue for using MP3 audio files in your games.

Jay [import]uid: 9440 topic_id: 22341 reply_id: 89770[/import]

@Jay,

I had read that regarding the …annual gross revenue…

  1. If the license has been paid by Apple, (and we got lucky with revenue; would it be your opinion that any revenue generated by iTunes would NOT be part of the $100,000.00 figure.

  2. Say we did go ahead and make an app; get lucky and break that $100,000.00 mark on Android alone. Do you think that the license fee could be paid at that time, or would you think it would need to be paid up front.

@thegdog, I agree with your link - and also ask you (number 2. above)

I mention all this because I have seriously considered using the mp3 format. I will reduce my audio consumption drastically. Also down to 3mb vs. 14.5mb. A very big savings.

Thank you both for your input and opinions, it means a great deal to me.

Rob
[import]uid: 16527 topic_id: 22341 reply_id: 89774[/import]

Remember, I’m not a lawyer… :slight_smile:

  1. I would think that it’s the gross revenue of the company (the entity) with regards to the money made by the apps that use MP3, so yes, iTunes revenue would count.

  2. Since you don’t have to pay if you’re under $100,000 I can’t imagine they would require you to pay up front on the chance that the app hits it big.

For me, when I have an app (or apps) that generate $100,000+ I’ll either fork over $2500 and not think about it again, or hire someone to research whether it’s really necessary or not. (Hiring a lawyer to look into that would probably take $2500 anyway.)

There are patent trolls who are NOT reasonable in the slightest and if they run you out of business trying to extract money from you, no problem. But there are licensing agencies (like the MP3 people) who want their money, but they don’t (from what I’ve heard) “go after” people like pitbulls.

Jay
[import]uid: 9440 topic_id: 22341 reply_id: 89777[/import]

Yeah, not a lawyer here either, but I would have to agree with Jay.

If you are that concerned, you could just create AAC and OGG files and use the respective format for the different platforms. It is more work, but if puts your mind at ease, then why not? [import]uid: 17827 topic_id: 22341 reply_id: 89784[/import]

Thanks guy - Great thoughts on the subject.

I had thought about doing something to this effect

if isAndroid then play .ogg else play .acc end

But I don’t want to have to write that in at EVERY LINE there is a call to an audio file. Might one of you be able to advise on how one would do this maybe with a table call. Where I would have all my files declared as variables then call accordingly base on the system. (Hope that make some sense)

[import]uid: 16527 topic_id: 22341 reply_id: 89808[/import]

@thegdog

That is perfect!! You just made my night. Thanks for the help!

Rob
[import]uid: 16527 topic_id: 22341 reply_id: 90073[/import]

Create a function like this:
[lua]mySoundPlay (filename)
if isAndroid then
filename = filename … “.ogg”
media.playSound(filename)
else
filename = filename … “.aac”
media.playSound(filename)
end
end[/lua]

Then, whenever you would call a sound, call it like so:
[lua]mySoundPlay(“soundfile1”)[/lua]

That function will build the filename accordingly.

I guess you could do it as a table as well, but this seems like an easy way to handle it to me. Maybe someone else can provide a table code snippet.

[import]uid: 17827 topic_id: 22341 reply_id: 89827[/import]

Sure thing. I will say that you might need some more logic in there. I myself haven’t done any kind of platform/OS detection, but at least it is a starting point.

You could also set up all your sound files at program launch using the OpenAL methods so they are all ready. For example:

[lua]if isAndroid then
laserSound = audio.loadSound(“laserBlast.ogg”)
explosionSound = audio.loadSound(“explosion.ogg”)
else
laserSound = audio.loadSound(“laserBlast.aac”)
explosionSound = audio.loadSound(“explosion.aac”)
end[/lua]

Then just do an audio.play on that object when you want it. [import]uid: 17827 topic_id: 22341 reply_id: 90103[/import]