IF any1 has N idea 'bout playing sounds through a PC speaker please post it or send mail.
thanks
Printable View
IF any1 has N idea 'bout playing sounds through a PC speaker please post it or send mail.
thanks
VB Code:
Private Declare Function sndPlaySound Lib "winmm.dll" Alias "sndPlaySoundA" (ByVal lpszSoundName As String, ByVal uFlags As Long) As Long Private Function Play(uFlags As Long) Dim Rc As Long Rc = sndPlaySound(mFileName, uFlags) End Function Private Sub Form_Load() mFileName = "C:\Windows\Media\hello.wav" Play (uFlags) DoEvents End Sub
Do you mean the INTERNAL speaker (PC Speaker) or the sound card's output port? That code will do the sound card one, but not the internal speaker.
Don't you need to send sound through the card to get to the speaker?
I think he already said PC SPEAKER!
all i know is
private sub cmd_butbeep
Beep
End sub
DAMN IM TOO BASIC.....:mad: :D
YES! I mean "PC SPEAKER".No sound cards ,no nothing.
About the 'Beep' command I tried it ,it just doesn't work.
Maybe if we put some more code in it?
SORRY Spyplayer.
Turns out you're right.I just couldn't hear my speaker.
And here's a tip:
for higher sounds alter N
for i= 1 to N
beep
next i
the higher N is the higher the beep is
Why not just use the API function, hell of a lot easier:
VB Code:
Private Declare Function Beep Lib "kernel32" Alias "Beep" (ByVal dwFreq As Long, ByVal dwDuration As Long) As Long Private Sub cmdBeep_Click() Beep 1000, 100 Beep 3500, 250 End Sub
You can make some really good tunes out of it. I made 'Twinkle Twinkle Little Start' once.
Yet,
these r not the sounds I've been looking for.
I apreciate the effort, but I'm looking more of a 'starting the computer' kind of beep.
the beep is different on the different BIOS chips available and the different PC Speakers. Have a fiddle with the frequency and duration of the Beep.