PDA

View Full Version : Beep beep ... ?



RobbeK
25-02-2014, 13:16
Hi folks,

Been writing something for the dark room (photography).
Used the SAPI module because Beep doesn't work here, Play_sound seems to be removed. (?)
How do I play some sounds (a dark room is mostly dark, need some vocal contact)

Thanks i advance

Rob

peter
25-02-2014, 13:29
Hello RobbeK


To play a sound (wav) try this here:



Declare Function PlaySound Lib "winmm.dll" Alias "PlaySoundA" Alias "PlaySound" (ByVal lpszName As String, ByVal hModule As Long, ByVal dwFlags As Long) As Long


Test:


PaySound "myWav",0,1

Or Beep


Declare Function Beep Lib "kernel32.dll" Alias "Beep" (ByVal dwFreq As Long, ByVal dwDuration As Long) As Long



Test:
Beep 440,500

RobbeK
25-02-2014, 15:23
Thanks Peter, .. perfect !