I'm making a game and I want to play sounds in it. I have AssetManager which loads the sounds and I made a class which has playSound(String sound) method. This method calls the get() method of the assets manager with the string, creates Sound type file and calls it's play() method. The code:

public void playSound(String sound) {
    Sound file = gameRenderer.assetsManager.get("sfx/sounds/" + sound + ".wav");

It works fine. But then I noticed there is a log that occurs every time the sound is played:

AUDIO_OUTPUT_FLAG_FAST denied by client

I also noticed a small "tick" sound in the end of the sound every time it's played in the game. I read about it and from what I've learned it has something to so with sample rate. I tried many types of sounds (44KHz, 48KHz, and lower values too) but it doesn't stop printing that log. I couldn't find a solution anywhere.

If it really has something to do with sample rate, does it mean I need to have different types of file of the same sound (With every sample rate)? If it does, my game would be heavy... I'm using Nexus 5. Thanks!



You must log in to answer this question.

Browse other questions tagged .