Using the following code even if your speakers are switched off you can still make a beep sound.
Code:
Private Declare Function Beep Lib "kernel32" (ByVal dwFreq As _
Integer, ByVal dwDuration As Integer) As Integer
'event
Beep(500, 500)'plays a beep at 500 frequency and 500milliseconds
Computer's internal speaker volume and frequency threshold varies from computer to computer so you will not be able to play all freuqencies.
Setting the frequency between 13000 and 16500 will make the hight pitched "mosquito" noise which most adults can't hear and will hurt your ears if you have good hearing.
Just a quick dll add (seems like it belongs here too)
this contains a variable list for every note (frequency already given for each variable)
for any other music nuts like me that might want to play around with not just console beep but really any embeded audio device will play the majority of these notes
keep in mind notes c1Sharp and below are less than 37 which is the minimum for most machine speakers, and anything over 12,000 is pretty much in audible unless you're a dog
Just a quick dll add (seems like it belongs here too)
this contains a variable list for every note (frequency already given for each variable)
for any other music nuts like me that might want to play around with not just console beep but really any embeded audio device will play the majority of these notes
keep in mind notes c1Sharp and below are less than 37 which is the minimum for most machine speakers, and anything over 12,000 is pretty much in audible unless you're a dog
I ran indirectly into this thread. How do you use the dll, what are the embedded functions?
Lottery is a tax on people who are bad at maths
If only mosquitoes sucked fat instead of blood...
To do is to be (Descartes). To be is to do (Sartre). To be do be do (Sinatra)
Using the following code even if your speakers are switched off you can still make a beep sound.
Code:
Private Declare Function Beep Lib "kernel32" (ByVal dwFreq As _
Integer, ByVal dwDuration As Integer) As Integer
'event
Beep(500, 500)'plays a beep at 500 frequency and 500milliseconds
Computer's internal speaker volume and frequency threshold varies from computer to computer so you will not be able to play all freuqencies.
Setting the frequency between 13000 and 16500 will make the hight pitched "mosquito" noise which most adults can't hear and will hurt your ears if you have good hearing.
Is this supposed to apply to .Net only? I've tried it under VB6 and it works if frequency and duration are stated as constants, but not if they are variables.
Lottery is a tax on people who are bad at maths
If only mosquitoes sucked fat instead of blood...
To do is to be (Descartes). To be is to do (Sartre). To be do be do (Sinatra)