Valhalla Legends Archive

Programming => General Programming => Topic started by: iNsaNe on March 05, 2006, 04:28 PM

Title: Re: Playing Sounds out of the HD [VB] or [C++]
Post by: iNsaNe on March 05, 2006, 04:28 PM
VB6 --

Create an OLE and scroll down to sound file, it will be in format .wav. Under the command you want you put:

Private sub Command1_Click()
   
       OLE1.Action = 7

End Sub

The sound is already loaded into that OLE and 7 means play sound.
Or if you want the program to beep.... the command is "Beep"..
Title: Re: Playing Sounds out of the HD [VB] or [C++]
Post by: MyndFyre on March 05, 2006, 05:11 PM
Why wouldn't you just do something.... crazy!... like import the PlaySound API?
Title: Re: Playing Sounds out of the HD [VB] or [C++]
Post by: MysT_DooM on March 05, 2006, 07:08 PM

Public Declare Function PlaySound Lib "winmm.dll" Alias "PlaySoundA" (ByVal lpszName As String, ByVal hModule As Long, ByVal dwFlags As Long) As Long
Title: Re: Playing Sounds out of the HD [VB] or [C++]
Post by: iago on March 06, 2006, 10:16 AM
Does it actually come out of the HD?
Title: Re: Playing Sounds out of the HD [VB] or [C++]
Post by: Stealth on March 06, 2006, 07:07 PM
Quote from: iago on March 06, 2006, 10:16 AM
Does it actually come out of the HD?

Reminds me of "Scanjet-elise (http://213.251.139.75/b84c13bd43009d1d95889dba437bb5d1/video/scanjet_music.wmv)" (WMV)

Edit: Thanks for the better link
Title: Re: Playing Sounds out of the HD [VB] or [C++]
Post by: iago on March 06, 2006, 08:26 PM
Quote from: Stealth on March 06, 2006, 07:07 PM
Quote from: iago on March 06, 2006, 10:16 AM
Does it actually come out of the HD?

Reminds me of "Scanjet-elise (http://www.yourfilehost.com/media.php?cat=video&file=scanjet_music.wmv)" (WMV)

Better link (http://213.251.139.75/b84c13bd43009d1d95889dba437bb5d1/video/scanjet_music.wmv) :)

That's pretty cool, though :)
Title: Re: Playing Sounds out of the HD [VB] or [C++]
Post by: Grok on March 30, 2006, 04:48 PM
Quote from: iago on March 06, 2006, 10:16 AM
Does it actually come out of the HD?

Definition of hard drive:  "the box that my monitor/keyboard/mouse is attached to."