nicolasgramlich / AndEngine

Free Android 2D OpenGL Game Engine
http://www.andengine.org
Apache License 2.0
3.17k stars 1.35k forks source link

Added autoPause() and autoResume() to SoundManager #215

Closed nazgee closed 11 years ago

nazgee commented 11 years ago

This fixes some of the issues where AE-based games are playing sound after leaving the game.

nazgee commented 11 years ago

I decided to go with onPause() and onResume(), since it matches the overall convention. I do not like it to much though, as it is called from start() and stop() methods of Engine, but I could not came up with something that suits both- convention used throughout AE, and the methods it is called from.

Fixed the missing new line too.