home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.os.ms-windows.programmer.tools
- Path: sparky!uunet!brunix!brunix!sp
- From: sp@cs.brown.edu (Seth Padowitz)
- Subject: Re: VB and sound
- Message-ID: <1992Jul21.223156.21625@cs.brown.edu>
- Sender: news@cs.brown.edu
- Organization: Brown University Department of Computer Science
- References: <1992Jul21.131332.28797@jarvis.csri.toronto.edu>
- Date: Tue, 21 Jul 1992 22:31:56 GMT
- Lines: 26
-
- If you have Windows 3.1, then you can use the sndPlaySound() API
- from VB to play sounds through your soundblaster.
- Alternatively, you can use the Media Control Interface (MCI)
- Custom Control included in the VB Professional Toolkit to play
- sounds.
-
- sndPlaySound() is defined in C as:
- BOOL sndPlaySound(LPCSTR lpszSoundName, UINT wFlags);
- lpszSoundName is the name of the sound (.WAV) file.
- wFlags is some combination of the following:
- SND_SYNC (0x0000) -- play synchronously (default)
- SND_ASYNC (0x0001) -- play asynchronously
- SND_NODEFAULT (0x0002) -- don't use default sound
- SND_MEMORY (0x0004) -- lpszSoundName points to a memory file
- (probably not very useful from VB -ed.)
- SND_LOOP (0x0008) -- loop the sound until next sndPlaySound
- SND_NOSTOP (0x0010) -- don't stop any currently playing sounds
-
- You'll need to create a VB prototype for sndPlaySound(). My VB
- is a bit rusty, so I'll simply recommend that you look at your
- manual.
-
- Hope this helps.
-
- Seth
-
-