Joey
Joey

Reputation: 33

How do I check if a sound is playing in the background?

I'm using My.Computer.Audio.Play(My.Resources.Sound1, AudioPlayMode.Background) to play my sound, but I need to check if it's already playing before executing this code because otherwise it just keeps looping to the start of the audio file, is there any way to do this in vb.net?

Upvotes: 0

Views: 780

Answers (1)

Anderson Nunes
Anderson Nunes

Reputation: 31

It's impossible without external library. You can use a OpenSource DLL like NAudio or LibZPlay to play and give all control over the player. It's simple and very efficient.

http://naudio.codeplex.com

http://libzplay.sourceforge.net/

Att.

Anderson

Upvotes: 1

Related Questions