# Audio format mobile games



## pixel (Nov 10, 2017)

Hi. Do anyone do sound design for mobile games here? 
I'm curious what importing format is popular for smaller games. I do not play such games so now I'm downloading some of them to do research. A lot of popular games seems to have really low bitrate and sample rate and they also have really small size. 
At this moment I keep short sfx in wav 44.1kHz and music/ambience loops in Ogg 256kbps 44.1kHz which is already a compromise for music. 
I work in Unity only for that particular project. I know it will compress audio to mp3 for a built but I have no idea to what format exactly. I know that lead programmer will push me to minimize audio files as much as possible and even more.


----------



## kristiang (Nov 11, 2017)

Been researching this myself and found that, of course, different games use different samplerates and compression. Not really helpful but for mobile games you want to keep the resources down to a minimum since not everyone is using a flagship smartphone. Thankfully audio does not drain the cpu and memory as much other types of assets. The manual have some good tips on what formats to use for different purposes. For instance, uncompressed wav for shorter clips (gun shots, footsteps etc) and compressed formats like ogg or mp3 for music and longer effects as a starting point.

I bounce all my audio to 16bit 44.1kHz and let Unity encode the music to ogg. Test what compression works best for your sources within Unity.

Check out Unity's manual on AudioClip (the forum won't let me share the direct link.)

Regards,
Kristian


----------



## pixel (Nov 11, 2017)

I just got idea to test builds of empty scene with only one or few audio clips (if this is possible without errors of course). That should give hard evidence of expected file size of build. 
Everything what I could find is about imported audio. I really would like to know how Unity decides to what kbps ogg it will compress while exporting to a build.


----------



## vicontrolu (Nov 11, 2017)

It's you who should ultimate decide, taking into consideration size limit vs quality.


----------



## pixel (Nov 11, 2017)

vicontrolu said:


> It's you who should ultimate decide, taking into consideration size limit vs quality.


Yeah but I also use the purpose of this forum 'musicians helping musicians' to learn more about standards in the industry. 
Also it would be easier if Unity developer could provide documentation of exported audio format. Right now all they said is 'compressed ogg'. Very informative...


----------



## vicontrolu (Nov 11, 2017)

I was trying to help you. There's no standard. If there's enough room for audio you will be able to increase the quality. Otherwise, prepare the axe and don't get mad about your work sounding like crap. Get used to the latter cause it happens more often than not !


----------



## Kyle Preston (Nov 11, 2017)

pixel said:


> I know that lead programmer will push me to minimize audio files as much as possible and even more.



I don’t know the specs of the game you’re working on, but this feels off to me. How many min of music are we talking?


----------



## pixel (Nov 11, 2017)

Kyle Preston said:


> I don’t know the specs of the game you’re working on, but this feels off to me. How many min of music are we talking?



Lead programmer seems to be more ambitious than it's worth. It's a gentle explanation 
It's kind of 'Castle Defend' game and I have to alternate music for different waves. Right now I did main theme + 5 alterations for the levels/waves. 5 minutes I would say for now. I see that such games have 30-50MB. So it should be absolutely fine.


----------



## Kyle Preston (Nov 11, 2017)

Hmm, gotcha. Well, seems like you're doing the right thing by keeping the client happy 

Maybe once the game is more fleshed out, suggest using wavs? Or at least 320 Oggs? I have a hard time believing 5 min of 256 Oggs is hogging up too much space. Unless the game is crazy ambitious...


----------



## kristiang (Nov 11, 2017)

Would definitely go for wavs. The file size will be reduced when being compressed for the final Unity build so no need to use highly compressed files within the Unity Project itself. Unless the programmer don't have spare megabytes space on the drives. 

Hope it goes well and would love to hear the music!

Kristian


----------

