Link to home
Start Free TrialLog in
Avatar of RayT
RayTFlag for United States of America

asked on

Loop Audio

I'm trying to use the latest release of Microsoft Visual Basic to play a WAV file.  I want to loop the audio.  Is there a way to do this without a noticeable gap?  Is there a library available that can do this?
Avatar of dovidf
dovidf
Flag of United States of America image

How are you playing the wav file?
Avatar of RayT

ASKER

I found a way to play it using

    My.Computer.Audio.Play(MediaFile, AudioPlayMode.BackgroundLoop)

This works great!

However,  I would like to have the following information.
a. How much of the file has played (in seconds).
b. How much is remaining the be played (in seconds).
c. Has the playing of the file reached the end.
Avatar of RayT

ASKER

I found a way to play it using

    My.Computer.Audio.Play(MediaFile, AudioPlayMode.BackgroundLoop)

This works great!

However,  I would like to have the following information.
a. How much of the file has played (in seconds).
b. How much is remaining to be played (in seconds).
c. Has the playing of the file reached the end.
Avatar of RayT

ASKER

I tried the this

https://stackoverflow.com/questions/20022864/c-sharp-axwindowsmediaplayer-loop

It does not work.  It causes the loop to 'stuttered'

This works.  No 'stutter' just a continuous loop.

My.Computer.Audio.Play(MediaFile, AudioPlayMode.BackgroundLoop)
Avatar of RayT

ASKER

I have no problem purchasing a third-party solution if it works.
Avatar of RayT

ASKER

Very Interesting!  I'll keep for future reference.  For now I'll go with

My.Computer.Audio.Play(MediaFile, AudioPlayMode.BackgroundLoop)

It works.
ASKER CERTIFIED SOLUTION
Avatar of RayT
RayT
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial