Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / Make a beep or bleep sound

Author
Message
Ben_UK78
15
Years of Service
User Offline
Joined: 10th Jul 2010
Location:
Posted: 12th Sep 2011 14:39
Argh,

This is driving me nuts. I know you can do this becuase I have done it before. All I want is a simple BEEP from the PC speaker.

Can anyone please help remind me as I have been looking for an age (was it an IanM command?)?
Mugen Wizardry
User Banned
Posted: 12th Sep 2011 14:41 Edited at: 12th Sep 2011 14:55
No. its a kernel32 command.

i'll make u 1.

CHECK OUT MY WEBSITE AT http://imageposeidon.com/ !
Mugen Wizardry
User Banned
Posted: 12th Sep 2011 14:55 Edited at: 12th Sep 2011 14:57


Have fun!

CHECK OUT MY WEBSITE AT http://imageposeidon.com/ !
WLGfx
18
Years of Service
User Offline
Joined: 1st Nov 2007
Location: NW United Kingdom
Posted: 12th Sep 2011 14:57 Edited at: 12th Sep 2011 14:58
The WinApi does have a "Beep (frequency,duration);". I'm just having a nosey round to see how to call it in DBPro unless someone gets there first... (Something to do with loading a dll in then calling the function from there)

EDIT: Ah Mugen got it. Nice one...

Warning! May contain Nuts!
Ben_UK78
15
Years of Service
User Offline
Joined: 10th Jul 2010
Location:
Posted: 12th Sep 2011 14:57
Brilliant, thanks.
Mugen Wizardry
User Banned
Posted: 12th Sep 2011 15:00
Ur quite welcome ^^

CHECK OUT MY WEBSITE AT http://imageposeidon.com/ !
Mugen Wizardry
User Banned
Posted: 12th Sep 2011 15:01
I'm not as dumb as I sound

CHECK OUT MY WEBSITE AT http://imageposeidon.com/ !
Mugen Wizardry
User Banned
Posted: 12th Sep 2011 15:12 Edited at: 12th Sep 2011 19:17
Here's an upgrade, it reads the current frequency in both value AND hex, and it reads the current duration. And I've expanded the beep system up to 0x7FFF frequency:



Enjoy!

CHECK OUT MY WEBSITE AT http://imageposeidon.com/ !
JackDawson
14
Years of Service
User Offline
Joined: 12th Jul 2011
Location:
Posted: 12th Sep 2011 18:58
Now that's what I'm talking about Mugen. NICE CODE !!

"Life is like a box of chocolates.. eat it before it melts."
Mugen Wizardry
User Banned
Posted: 12th Sep 2011 19:00
Thanks, man!

CHECK OUT MY WEBSITE AT http://imageposeidon.com/ !
Green Gandalf
VIP Member
21
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 14th Sep 2011 00:50
Quote: "I'm not as dumb as I sound "




Neat demo. Thanks.
Mugen Wizardry
User Banned
Posted: 14th Sep 2011 00:51
No problem!

CHECK OUT MY WEBSITE AT http://imageposeidon.com/ !

Login to post a reply

Server time is: 2026-07-10 09:57:52
Your offset time is: 2026-07-10 09:57:52