libgdx / gdx-pay

A libGDX cross-platform API for InApp purchasing.
Apache License 2.0
225 stars 83 forks source link

Music jetting problem #195

Closed gagbaghdas closed 5 years ago

gagbaghdas commented 5 years ago

Hi Guys.

I have the following problem.

WHAT I KNOW...

In LibGDX there are 2 classes for playing music/sounds. Music.java and Sound.java.

When you want to play a short sound(less than 1m), it is a good practice to use Sound.java class, because it loads to the memory. When you want to play long music (more than 1m), it is a good practice to use Music.java class, because it doesn't load in memory, but use streaming to play it.

WHAT I DO...

I use Music.java class in order to play background and loading music in my game.

WHAT PROBLEM I HAVE...

The problem is when I play music using Music.java class and when I read from disk some data (atlasses, for example), the music plays with jitter. So, as I understand, that the problem is in streaming, as I have that problem when I read from disk only. It seems, there is no way to open 2 fully separate threads for streaming. I mean, one for music and another for all other things such us read from a file or write. I tried to play the music in the new thread, but nothing changed.

The problem is only with music streaming and only when I read data from the disk. For example, read atlases

Any ideas What I'm doing wrong?

Thanks.

MrStahlfelge commented 5 years ago

Hi, this is for gdx-pay issues. For questions like this best choice is to use the discord server: https://discord.gg/6pgDK9F

gagbaghdas commented 5 years ago

Huh. Sorry ) Thanks.