Android Question Play short .wav file in a loop [solved]


Well-Known Member
Licensed User
Is there a way to play a short wav file in a loop (without interruption)?
I know I can play a sound file using intent, but that does not play continuously.

I am trying to convert a white noise generator I wrote for the PC (VB 6.0) a long time ago and I believe the wav file had to be a certain length to play continuously without gap. The wav file I have works fine on the PC, it is about 1 second long with 16 bits samples, mono.

So I am looking for a way to play that file on B4A. I can easily adjust the length of the wav file (number of samples), in case B4A would have the same requirement in order to play continuously.

Alternately, I could generate the sound samples on the fly and store them in a RAM buffer to be played directly (without actually creating a file) if there was a way to play a RAM buffer continuously.


B4X founder
Staff member
Licensed User
Longtime User
Upvote 0