From mboxrd@z Thu Jan 1 00:00:00 1970 From: Itai Nahshon Date: Wed, 12 May 1999 17:59:17 +0000 Subject: Re: Playing a sine wave Message-Id: List-Id: References: In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-sound@vger.kernel.org >> Is it possible to use the sequencer stuff in the OSS sound driver >> to let the sound card play a sine wave of a given frequency? >In theory it's possible to play sine waves using the OPL3 FM synth chip >available on most older (ISA) soundcards. However this is very inpractical >way. > >A much easier way is using /dev/dsp. You only need to construct few cycles >of sine wave at given frequency to a buffer. Then just keep writing this >buffer to /dev/dsp as many times as you need. In fact it may even be >possible that somebody has already written this kind of app (look at >ftp://sunsite.unc.edu/pub/Linux/apps/sound). See http://metalab.unc.edu/pub/Linux/apps/sound/dtmf-dial-0.2.tar.gz It combines two sine waves and outputs to /dev/dsp. You are welcome to hack on it. Internally it has the function to produce sine waves at any integer frequency and sampling rate. Itai