The last Ubuntu release with
/dev/dsp support was 10.04. After that support for
/dev/dsp was removed.
To still be able to use older software that rely on
/dev/dsp there is a compatibility wrapper padsp which redirects sound output meant for
dsp to a running pulseaudio server. We may use this wrapper with the following terminology:
padsp [options] APPLICATION [arguments ...]
padsp signalgen -v sin 120
By this we may be able to also play the output of signalgen to our soundcard. The OSS complatibility layer will be installed as a dependency with siggen .
If we do not want to output the sound directly we can use
signalgen to directly write a raw audio file to then play this file through ALSA using
signalgen -w filename -t 5 sin 120 & aplay filename
Note that signalgen will exit if
filename already existed.
A better approach to generate waves without the need of a compatibility layer would be applications that are able to directly address ALSA or PuleAudio.
Sox will install the command line utility play which will not only play sound files but can also generate audio waveforms and can add effects to them:
play -n synth sine 120.0 gain 0.0