Avatar of RayT
RayT
Flag 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?
Visual Basic.NETMultiMedia Applications

Avatar of undefined
Last Comment
RayT

8/22/2022 - Mon
dovidf

How are you playing the wav file?
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.
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.
Experts Exchange is like having an extremely knowledgeable team sitting and waiting for your call. Couldn't do my job half as well as I do without it!
James Murphy
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)
RayT

ASKER
I have no problem purchasing a third-party solution if it works.
dovidf

This video may be of interest

https://www.youtube.com/watch?v=A0ZBAPPtbKQ
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
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
RayT

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.