=====================================================================
TIPS FOR SOUND
=====================================================================
When making games in android
1.- avoid to play sound at start of frame (this will give time to fully load sounds, if you are using preload)
2.- organize your sounds in channels, a better and clean way to use sounds.
3.- define in your sounds which one can be play from disk, once play, several plays?, actually welcome sounds are high candidate to be "play from disk"
4.- try not to use name with space or special chars, (even if fusion translate the name for sounds and use them accordingly) is better to have name with non special chars or space.
5.- keep sound with low bitrate, please dont ask the devices to play a bitrate of 256 or above, this is no Opera is a game and mostly device will not be capable to do it, and you will get the risk to drop some sound during play.
6.- be sure that your sounds does not have any DRM or watermark in it.
7.- You can go down to some pretty low bit rates (under 80kbps) and maintain acceptable quality for mono music and speech.
8.- test your games before post, trying to put your hand as many device you can, each manufacturer have made changes in the way they play sounds, sounds was a weak point since android start.
9.- remember if is a graphic 50% is runtime and 50% is OS (available memory, size limits, etc.) but for sounds 10% is runtime, 90% is OS (decoder, DRM, player, almost everything is done by OS, etc.).
You won’t be able to use DRM protected media on your Android device.
This weekend i had the opportunity to work in a strange error since a game runs without crash in samsung or other brads but not in nexus family, where it did crash all the time.
so after checking the log the following error is detected:
01-25 10:33:06.798: E/FwdLockEngine(193): FwdLockEngine::onInitialize -- FwdLockGlue_InitializeKeyEncryption failed:errno = 11
Any reference to FwdLockEngine with errno=11, which is: try again, this show that the drm system try but does not find a way to unlock the sound.
so this will make the application to hang or simply does not sound.
=====================================================================
How can i know that i am not using DRM sounds in my development?
=====================================================================
Before adding sounds to your project check for protected mode. to do so
1.- in Windows, open the folder where the sounds are.
Please login to see this attachment.
2.- select details view, and check if the column protected is used, if not follow the following step.
Please login to see this attachment.
3.- move your cursor above the columns header, right click, and check if protected is available in teh list, if not, press more, search and select.
Please login to see this attachment.
4.- once this column is on you may see the corresponding values to any sound you will use in your project, be sure it says "No", "Yes" will make the sound crash in nexus family.
but there is another value that is Empty string, this value must be tested to avoid any crash or a partially protected file.
Please login to see this attachment.
=====================================================================
What to do if a sound is in this situation?
=====================================================================
1.- if a sound you need is in this situation your best help is to export it again without any traces of DRM, to do so you may use "Audacity".
when exporting delete any information in the watermark.
2.- If you bought the sounds from others or third paties, you may need to ask them how to provide you with sounds without any DRM to avoid conflict in your game.