From: The Natural Philosopher on
For a debian linux system.

I don't want the syntesizer bit..can take care of all that..just how to
hook C or indeed any other language into making a noise come out of the
speakers.

Ideally would be a fragment of code that simply makes any noise on my
ALSA based sound system.

The only bit I found segfaults when it opens device 'default'

From: pk on
The Natural Philosopher wrote:

> For a debian linux system.
>
> I don't want the syntesizer bit..can take care of all that..just how to
> hook C or indeed any other language into making a noise come out of the
> speakers.
>
> Ideally would be a fragment of code that simply makes any noise on my
> ALSA based sound system.
>
> The only bit I found segfaults when it opens device 'default'

How about

anything_that_produces_some_output > /dev/dsp

(the noise that comes out of it is not very pretty though)
From: despen on
The Natural Philosopher <tnp(a)invalid.invalid> writes:

> For a debian linux system.
>
> I don't want the syntesizer bit..can take care of all that..just how
> to hook C or indeed any other language into making a noise come out of
> the speakers.

For C:

system("aplay sound.wav");

similar facilities exist for most other languages.
From: The Natural Philosopher on
despen(a)verizon.net wrote:
> The Natural Philosopher <tnp(a)invalid.invalid> writes:
>
>> For a debian linux system.
>>
>> I don't want the syntesizer bit..can take care of all that..just how
>> to hook C or indeed any other language into making a noise come out of
>> the speakers.
>
> For C:
>
> system("aplay sound.wav");
>
> similar facilities exist for most other languages.

I dont have a wav.

I want to MAKE one perhaps.
From: The Natural Philosopher on
pk wrote:
> The Natural Philosopher wrote:
>
>> For a debian linux system.
>>
>> I don't want the syntesizer bit..can take care of all that..just how to
>> hook C or indeed any other language into making a noise come out of the
>> speakers.
>>
>> Ideally would be a fragment of code that simply makes any noise on my
>> ALSA based sound system.
>>
>> The only bit I found segfaults when it opens device 'default'
>
> How about
>
> anything_that_produces_some_output > /dev/dsp
>
> (the noise that comes out of it is not very pretty though)

OK, can you ( haha ) AMPLIFY on that a little?


If I feed a bunch of bytes to that, are they simply buffered and spat
out as a sequence of binary audio levels at 44Khz?

If so, its just what I need.