Sound procedure does not work

classic Classic list List threaded Threaded
22 messages Options
12
Reply | Threaded
Open this post in threaded view
|

Re: Sound procedure does not work

Peter
On 15/09/15 22:14, Graeme Geldenhuys wrote:

> On 2015-09-15 20:59, Peter wrote:
>> I guess he means Procedure Sound in rtl/unix/crt.pp
>> This does not work for me either, just get the "sound of silence".
>
>
> That is a know problem for many years. Here is a thread from 2007.
>
> http://free-pascal-general.1045716.n5.nabble.com/simple-sound-implementation-td2816047.html#a2816060
>
>
> Regards,
>   - Graeme -
>


Still, seems easy enough to do basic sounds in linux by shelling the
beep command....


program soundcheck;

uses Process;

var s : ansistring;

begin
   RunCommand ('beep',['-f','100','-l','900'],s);
end.


Fisrt number is frequency, 2nd is length in Ms.
Need to have 'beep' installed, and possibly need to do

sudo modprobe pcspkr



Regards,
PB
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Sound procedure does not work

fredvs
> Still, seems easy enough to do basic sounds in linux by shelling the beep command....

Ha, ok, you only want to make a sound...

Peter's beep way is maybe the the easiest.

You may also use portaudio library to produce sine-wave.

Here example done by Mister Blaazen with library included=>
https://sites.google.com/site/fiensprototyping/DynSynthDemo.tar.gz

Fre;D

Many thanks ;-)
12