[Lazarus] Invalidation of parent control
Benito van der Zander
benito at benibela.de
Thu Sep 2 16:14:31 CEST 2010
On Wed, 01 Sep 2010 15:38:13 +0200 John vd Waeter <john at jvdw.nl> wrote:
> Lol, I wrote something like that years ago... but in these days it was
> allowed to address the speaker hardware...
> Windows.Beep(freq,duration) does about the same, but afaik it is not
> implemented in Lazarus.
At the risk of asking a silly question. Why has no-one ported the
Windows.Beep procedure to Lazarus. Surely it is not too hard ?!?
Personally, I like this simple method of basic speaker sounds and I use
it with a boolean variable called 'want_sounds' which I let the user
toggle via a Tmenuitem (part of a Tmainmenu of the form). I find that
this works well and keeps happy users who don't want sound effects. I
also write & read this setting to an .ini file, which is simple and
saves the user's choice.
Would someone please investigate porting the Windows.Beep procedure to
lazarus. I can convert the remainder of the TBeeper.pas unit to
Lazarus ... and I think that it would be popular (in limited circles).
Hobart, Tasmania, Australia
> Peter E Williams wrote:
> > Hi Michael and All,
> > Actually I don't need a resolution of single milliseconds. I really only
> > need tens or even hundreds of milliseconds. Typical MSecs parameter is
> > 100ms. Also, exact Tone frequency is not required... only the approx
> > frequency tone. Obviously, since I want to create a range of tones then
> > creating custom wave files would be overkill.
> > The original TBeeper component for Delphi simply beeped the pc speaker
> > and used some assembler code, but it was only 26KB of code. It also had
> > the ability to play simple tone 'songs' by beeping a range of tone
> > frequencies at different durations. These 'songs' were simply ASCII text
> > data files. I still have it if you are interested.
> > Best Regards,
> > PEW
> > Hobart, Tasmania, Australia
> > On Wed, 2010-09-01 at 14:21 +0200, Michael Schnell wrote:
> >> You cant get a resolution of milliseconds in a user program.
> >> So I would create a wave file that contains the correct "bleep".
> >> With Delphi I once used this wave player component:
> >> http://www.un4seen.com/. I don't know if it's been tested with Lazarus
> >> and if something similar can be done on Linux.
> >> I used some free tool to create sine and similar waves in wav-files.
> >> -Michael
> John vd Waeter
> john at jvdw.nl
Proudly developing Quality Cross Platform Open Source Games
Since 1970 with a Commodore PET 4016 with 16 KRAM
http://pews-freeware-games.org (<--- brand new)
More information about the Lazarus