ID: 151
Viewed: 2956
Added: Apr 28, 2002
Version:
Snippet uploaded by: snippet
Written By: unknown
Demo: Sorry, no demo
Thank you for your vote. Please wait...
It appears you already voted for this snippet
It appears your vote value was empty
Using the win95io api's you could generate tones from your pc speaker
Highlight all by clicking in box
<!---Declaration--->
Private Declare Sub vbOut Lib "WIN95IO.DLL" (ByVal nPort As Integer, ByVal nData As Integer)
Private Declare Function vbInp Lib "WIN95IO.DLL" (ByVal nPort As Integer) As Integer
Highlight All
<!---Code--->
Sub Sound(Freq)
vbOut 66, CInt(1193280 / Freq) And 255
vbOut 66, CInt(1193280 / Freq) 256
vbOut 97, vbInp(97) Or 3
End Sub
Sub SoundOff()
vbOut 97, 0
End Sub
Sub SoundInit()
vbOut 67, 182
End Sub;
No Comments to show
Please completely fill out the form below if you want to review this snippet. All reviews are subject to validation.
Adding your comment. Please wait...
Thanks for adding your comment!. After further review it will be added.
There was a problem adding your comment. Please try again.
Please complete all the fields in the form before sending.