m4a 64kbps @32KHz vs. 128kbps @ 44.1KHz

My game size is currently around 44MB
I want to shrink the game size as much as possible.

The music takes up most of the game's memory, so I was thinking of replacing the current music @ 128kbps with half the bitrate, this will save me another 8MB so the game will be 36MB.
There is a noticeable difference in sound quality especially when wearing headphone, but I think if players have nothing to compare it to then they wouldn't see it as lower quality.
But I'm more concerned about performance.
If a 64kbps audio file makes the game run faster then I will go with that.
I don't know if m4a files are streamed by the CPU or run through the memory in GS.
If they are loaded into the RAM then a smaller file will most likely perform better/ make the game faster.

Comments

  • SocksSocks London, UK.Member Posts: 12,822

    @abuabed84 said:
    But I'm more concerned about performance.
    If a 64kbps audio file makes the game run faster then I will go with that.

    Changing the bit-rate, bit-depth or sampling-rate will have no effect on CPU performance or memory usage (RAM), as 'music' files are handled by Core Audio on iOS devices and (I would guess) something similar on Android, this is the reason we have 'music' and 'sound', sound is loaded into RAM (which effects CPU/RAM) while music is streamed through (I believe) dedicated hardware.

    Lowering the overall quality of your music will save you disk space, but won't impact on performance.

    64kbps is pretty low quality for music !

  • 3absh3absh Member Posts: 601

    sound is loaded into RAM (which effects CPU/RAM) while music is streamed through (I believe) dedicated hardware.

    isn't streaming 64kbps supposed to be easier on the CPU than streaming a 128kbps, or would that be a negligible impact on the CPU?
    I imported one of my music files as an ogg sound file, and I notice a slight lag when it starts playing (music file is about 3MB).
    It plays during an event in the game.

    64kbps is pretty low quality for music !

    64kbps is noticeably bad at 44.1KHz, but @32KHz it gets slightly less "jaggy", and I think pretty acceptable for cellphone speakers, since that's where about 90% of players will hear the audio from.

  • SocksSocks London, UK.Member Posts: 12,822

    @abuabed84 said:
    I imported one of my music files as an ogg sound file, and I notice a slight lag when it starts playing (music file is about 3MB).

    Have you trimmed the audio so there is no silence at the start ?

    @abuabed84 said:
    64kbps is noticeably bad at 44.1KHz, but @32KHz it gets slightly less "jaggy", and I think pretty acceptable for cellphone speakers, since that's where about 90% of players will hear the audio from.

    It gets less 'jaggy' because a 32kHz file is chopping off all the frequencies from 16kHz-22kHz !

    The frequencies from 16-22kHz stated out life nice and smooth, the low bit-rate (64kbps) made them alias (made them 'jaggy'), then reducing the sampling-rate simply chopped them off. So the method works in the same way you can 'cure' an infected ingrowing fingernail by chopping the patients hand off :P :)

    I'm not 100% sure what you are aiming for with lowering the quality like this, the advantage (singular) is pretty small for the compromises involved, a few MB less disk space, whilst having no effect on CPU performance, loading time or even memory (RAM) usage.

  • 3absh3absh Member Posts: 601

    Have you trimmed the audio so there is no silence at the start ?

    It's a performance lag (the game freezes for a few milliseconds)

Sign In or Register to comment.