Sver
Full Member
Posts: 145
|
Post by Sver on Aug 30, 2020 12:33:09 GMT -5
Frequency = 1000 Duration = 100 null = BeepEx(Frequency, Duration) end
function BeepEx(dwFreq, dwDuration) calldll #kernel32, "Beep",_ dwFreq as ulong,_ dwDuration as ulong,_ BeepEx as boolean end function
There are more old, snippets. Is it usefull to show them ?
|
|
|
Post by Rod on Aug 30, 2020 15:01:31 GMT -5
If I recall past events correctly very few PCs support beep. It relies on the PC having a circuit board speaker. Few have these days,
|
|
|
Post by Carl Gundel on Aug 30, 2020 15:29:37 GMT -5
Frequency = 1000 Duration = 100 null = BeepEx(Frequency, Duration) end
function BeepEx(dwFreq, dwDuration)
calldll #kernel32, "Beep",_ dwFreq as ulong,_ dwDuration as ulong,_ BeepEx as boolean end function
There are more old, snippets. Is it usefull to show them ? Yes, old snippets can be good to share. They can inspire others and encourage conversation on the board, and also they can bring more organic search traffic to our community, but... API code should be posted in the API and DLL code area.
|
|
|
Post by Chris Iverson on Aug 30, 2020 15:44:44 GMT -5
If I recall past events correctly very few PCs support beep. It relies on the PC having a circuit board speaker. Few have these days, That should actually be irrelevant since Windows 7, where the internal beep code was changed. docs.microsoft.com/en-us/archive/blogs/larryosterman/whats-up-with-the-beep-driver-in-windows-7Basically, they needed BEEP to still work due to requirements of the Americans with Disabilities Act, but a lot of hardware had been shipping without the speaker needed to beep. So they rewrote the beep driver to output the sound over the default audio device, instead of the 8254 speaker chip.
|
|
|
Post by tenochtitlanuk on Aug 31, 2020 3:46:29 GMT -5
Beep is silent on my LB-under-Wine in Linux.... and I virtually never use Microsoft these days.
|
|
|
Post by Brandon Parker on Sept 1, 2020 13:41:35 GMT -5
Beep does not work for me either on Windows 10 Home. Maybe LB is not actually calling the Windows Beep() kernel32.dll function, but instead is using something built into Smalltalk to trigger the physical speaker which ... is no longer there on most PC's. Since Windows 10 is supposed to have rerouted the Beep() call to just beep through the default audio then this is what I suspect is happening, but Carl would need to confirm what LB/Smalltalk is doing in V4.x.x.
{:0)
Brandon Parker
|
|