Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2010-09

How to produce a tone at Tone frequency for duration, MSecs (milliseconds)

6 messages · 5 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Peter E Williams

Ho Benito,

Show quoted text 7 lines
Hi, are you using Windows or Linux? I will assume Windows, because you want to replace the Delphi component. Then you can Windows.Beep, (which I'm pretty sure exists in Lazarus), or directly talk to the device driver like I described it here: http://bugs.freepascal.org/view.php?id=12437

Sorry, but I am using Linux Ubuntu. As someone else made the point, it apparently can only be done if I have root access to write to /dev/console. I didn't want a component that I need root privileges to run.

Benito van der Zander

Best Regards,
Peter
Hobart, Tasmania, Australia

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)

Reply by email

Michael Schnell
to Peter E Williams
Peter E Williams wrote
Sorry, but I am using Linux Ubuntu. As someone else made the point, it apparently can only be done if I have root access to write to /dev/console.

Of course Linux does have a sound subsystem that can be fed with audio data by user programs via a decent API: ALSA.

I didn't want a component that I need root privileges to run.

:)

-Michael

Reply by email

Sven Barth
to Michael Schnell
Michael Schnell wrote 10 lines
On 09/02/2010 06:42 PM, Peter E Williams wrote: > > Sorry, but I am using Linux Ubuntu. As someone else made the point, it > apparently can only be done if I have root access to write > to /dev/console. Of course Linux does have a sound subsystem that can be fed with audio data by user programs via a decent API: ALSA. > I didn't want a component that I need root privileges > to run. :)

If it is installed... -.-

That's the biggest problem with the Linux distrubtions "ecosystem" in my opinion (but also one of its strengths): you can't rely on anything. Some distros don't install this, some don't install that, some enable setuid on beep (Debian), some don't (ArchLinux). No wonder that those systems use things like autoconf :P

Regards,
Sven

Reply by email

Henry Vermaak
to Sven Barth
Sven Barth wrote 19 lines
Am 03.09.2010 10:24, schrieb Michael Schnell: > On 09/02/2010 06:42 PM, Peter E Williams wrote: >> >> Sorry, but I am using Linux Ubuntu. As someone else made the point, it >> apparently can only be done if I have root access to write >> to /dev/console. > Of course Linux does have a sound subsystem that can be fed with audio > data by user programs via a decent API: ALSA. >> I didn't want a component that I need root privileges >> to run. > :) If it is installed... -.- That's the biggest problem with the Linux distrubtions "ecosystem" in my opinion (but also one of its strengths): you can't rely on anything. Some distros don't install this, some don't install that, some enable setuid on beep (Debian), some don't (ArchLinux). No wonder that those systems use things like autoconf :P

Exactly the opposite. You can rely on _anything_ you want. Just add a dependency in your package to pull in the package you need. Using beep as an example is contrived, since it's almost always the wrong thing to use, and I presume that's why there's only one package in debian that depends on it.

Henry

Reply by email

Sven Barth
to Henry Vermaak
Henry Vermaak wrote 26 lines
On 03/09/10 09:56, Sven Barth wrote: > Am 03.09.2010 10:24, schrieb Michael Schnell: >> On 09/02/2010 06:42 PM, Peter E Williams wrote: >>> >>> Sorry, but I am using Linux Ubuntu. As someone else made the point, it >>> apparently can only be done if I have root access to write >>> to /dev/console. >> Of course Linux does have a sound subsystem that can be fed with audio >> data by user programs via a decent API: ALSA. >>> I didn't want a component that I need root privileges >>> to run. >> :) > > If it is installed... -.- > > That's the biggest problem with the Linux distrubtions "ecosystem" in my > opinion (but also one of its strengths): you can't rely on anything. > Some distros don't install this, some don't install that, some enable > setuid on beep (Debian), some don't (ArchLinux). No wonder that those > systems use things like autoconf :P Exactly the opposite. You can rely on _anything_ you want. Just add a dependency in your package to pull in the package you need. Using beep as an example is contrived, since it's almost always the wrong thing to use, and I presume that's why there's only one package in debian that depends on it.

This only applies to distros that provide a dependency resolving package system and if packages for your application are provided for that distro.

These two points should not be taken granted.

Regards,
Sven

Reply by email

Bernd Kreuss
to Sven Barth
Sven Barth wrote
This only applies to distros that provide a dependency resolving package system and if packages for your application are provided for that distro.

I think that for the few users who intentionally use one of these specialized ultra-hardcore-geek distros without any package management you can write it into the readme file. This is where they always look because parsing the README and INSTALL files and following their instructions is the only way to install *anything* on these distros.

All others have some form of automated package and dependency management.

Reply by email