0

I'm using LibGDX, but I read in other places that this problem is in Android development in general and not only in LibGDX. 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");
file.play();}

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 read about it and from what I've learned it has something to so with the 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!

Gad Wissberg
  • 455
  • 1
  • 6
  • 19

0 Answers0