[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 168
  • Last Modified:

How to create immediate sound from click

I am learning VB5 and am trying to create a "Simon" like game, for practice.  Can anyone help me with a routine that can produce immediate sound from a click ?  I would need to control pitch and duration. I am, unfortunately, working w/ a 486/66.  Any and all help is greatly appreciated.
0
jinx1
Asked:
jinx1
1 Solution
 
topolCommented:
API function Beep does it.
0
 
jinx1Author Commented:
Adjusted points to 100
0
 
jinx1Author Commented:
I'm trying to find a routine that doesn't use the internal speaker.
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
viktornetCommented:
How about PlaySound() ???

Regards,
Viktor Ivanov
0
 
a111a111a111Commented:
I found a program that have a Vb source code to play immediate sound.

There take only the lines that you need for your "Simon" like game
Also you can find a nice procedures in the same code.

http://www.geocities.com/SiliconValley/Way/5233/vb1.htm
Download Multimedia Player(58kb) + source.

If you are not able to get the code email to shay@hili.com and I'll email it to you.

0
 
a111a111a111Commented:
Hi,
Here is one more way to havre sound.
use wav files with voices clicks squicks and so.

and here is a very simple code to run it.

'=========== start ========

Option Explicit
Private Declare Function sndPlaySound Lib "winmm.dll" Alias "sndPlaySoundA" (ByVal lpszSoundName As String, ByVal uFlags As Long) As Long

Private Sub Command1_Click()
Dim SndPlay
SndPlay = sndPlaySound("c:\hello.wav", 1)
End Sub

'======== end =========
0
 
a111a111a111Commented:
Hi again.
If you need some wav files....
here are some links to great wav files...

1. http://www.allwavs.com/
2. http://www.wav.com/
3. http://home1.pacific.net.sg/~yms/wav.htm

if you need more let me know..



0
 
jinx1Author Commented:
Thanks a1  !
0

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now