Application::applicationDidEnterBackground called each time device comes to sleep, so stop music at this moment.
You can resume music and effects on
Application::applicationWillEnterForeground, but this solution will cause issues on some android devices (e.g. music will be played on phone call screen or on lock screen). There is better solution (recommended by android developers): resume music when user makes first touch after device came to sleep or app came to pause.