0

Hey

I'd like to be able to play an mp3 file in a an application in one of my Load procedures.
I just need the syntax for playing the file.

thanks,

Lee

3
Contributors
5
Replies
6
Views
8 Years
Discussion Span
Last Post by Lee_Sonnenburg
0

Ok so I figured it out.

But something I can't figure out is how I can loop the audio file over and over until a condition is met.

My code is:

Dim DONDTheme As String = "C:\DOND\bin\Debug\dond.wav"

       My.Computer.Audio.Play(DONDTheme)

This is in my load procedure so basically, when the song stops, i'd like it to start up again until a button is pressed.

0
Dim DONDTheme As String = "C:\DOND\bin\Debug\dond.wav"
My.Computer.Audio.Play(DONDTheme,  AudioPlayMode.BackgroundLoop)

And call My.Computer.Audio.Stop() to stop looping.

0

alternative, you use WindowsMediaPlayer to play media file.

In my opinion adding a reference to COM-object would be an overkill if Lee only wants to play a simple background audio.

0

yeah thanks JX but i'm gonna go with the simple parameter that loops it for me.

thanks for your help teme.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.