Computing.Net > Forums > Programming > Wave files in VB6

Computing.Net: Over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to sign up now, it's free!

Wave files in VB6

Reply to Message Icon

Original Message
Name: BaBa
Date: January 12, 2003 at 10:03:45 Pacific
Subject: Wave files in VB6
OS: win98
CPU/Ram: 98M
Comment:

Hi,

I would like to know how I can play a wave file over and over and over none stop. using the MCI control in VB6.
Please, help!
anything is appreciated


Report Offensive Message For Removal


Response Number 1
Name: Karl
Date: January 12, 2003 at 18:13:00 Pacific
Reply: (edit)

This is using API but it works just fine.

These Declarations:
Private Declare Function sndPlaySound Lib "winmm.dll" Alias "sndPlaySoundA" (ByVal lpszSoundName As String, ByVal uFlags As Long) As Long
Const SND_ASYNC = &H1
Const SND_NODEFAULT = &H2
Const SND_LOOP = &H8

With These Calls:

To Start:
sndPlaySound *Your Sound's FilePath*, SND_ASYNC Or SND_LOOP Or SND_NODEFAULT

To Stop:
sndPlaySound "NULL", SND_ASYNC Or SND_LOOP Or SND_NODEFAULT


Report Offensive Follow Up For Removal

Response Number 2
Name: BelAnWel
Date: January 13, 2003 at 16:19:22 Pacific
Reply: (edit)

can u also use this for .omg and .mp3 audio formats?


Report Offensive Follow Up For Removal

Response Number 3
Name: BaBa
Date: January 14, 2003 at 14:57:24 Pacific
Reply: (edit)

Hi,

Thanks guys for you responses.

Karl, you example worked fine, I love it. Thank you!


Report Offensive Follow Up For Removal







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Programming Forum Home








Do you have your own blog?

Yes
No
I did before
I will soon


View Results

Poll Finishes In 4 Days.
Discuss in The Lounge
Poll History




Data Recovery Software