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

Discussion in 'Android Questions' started by Didier9, Jun 4, 2019.

  1. Didier9

    Didier9 Active 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.
  2. Erel

    Erel Administrator Staff Member Licensed User

    Didier9 likes this.
  3. Didier9

    Didier9 Active Member Licensed User

    Thank you Erel, that gives me a number of options to try.
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice