Android Question Audio Lib 1.63 Pitch Issue

wonder

Expert
Licensed User
Longtime User
Hello Erel,

I've noticed a small issue with the Audio lib.
In my game "Project Ryu", the attached mp3 file plays at the beginning of the match.
B4X:
snd_effect.Play(voice_fightID, 1, 1, 0, 0, 0)

The problem is that the pitch isn't the same across different devices.
It seems to me that, on faster devices the pitch is higher.

[Tablet] Asus ME173X: Normal Pitch
[Tablet] nVidia Shield: Higher Pitch
[Phone] Sony Xperia P: Normal Pitch
[PC] Google Chrome (Arc Welder): Higher Pitch

How to solve this without resorting to use another library?
 

Attachments

  • voice_fight.zip
    36.4 KB · Views: 189
Last edited:

Cableguy

Expert
Licensed User
Longtime User
Hi Bruno, have you tri playing the file outside the game environment, just as you would do with any mp3 file? If so, were there any differences in pitch? I'm aiming at more of an hardware issue...(speaker quality)
 
Upvote 0

wonder

Expert
Licensed User
Longtime User
I've just finished rewriting my code to work with the libGDX internal sound engine instead of the the Audio lib.
The problem's solved for me, but the issue still exists in the default lib.
Hi Bruno, have you tri playing the file outside the game environment, just as you would do with any mp3 file? If so, were there any differences in pitch? I'm aiming at more of an hardware issue...(speaker quality)
Yes, the pitch is entirely different. I even compared it head-to-head, [PC Winamp Media Player] vs. [nVidia Shield] and [Chrome Arc Welder].
Furthermore, my speakers are fine. I've tested across different devices, headphones and speakers.
Also, I've re-encoded the original sound file to mp3 and ogg various times with different bitrate options. No effect.
 
Upvote 0

wonder

Expert
Licensed User
Longtime User
Upvote 0
Top