[OFFTOPIC] Re: dspW

Mike A. Harris (mharris@ican.net)
Wed, 13 Jan 1999 05:45:46 -0500 (EST)


On Tue, 12 Jan 1999, Mike wrote:

>> >I read somewhere that /dev/dspW, char major 14 minor 5 could be used to
>> >play wav format files. Hpwever, this doesn't seem to work - cating a wav
>> >to it generates something that sounds vaguely like the wav but at the
>> >wrong sample speed. What gives?
>>
>> This message has nothing to do with the kernel, or development,
>> rather it is an RTFM thing.
>
>I'm sorry, but which FM am I s'posed to read? It is not mentioned in
>Documentation/devices.txt.

The one that says "don't post these types of messages to the
kernel mailing list - they are not _KERNEL_DEVELOPMENT_ issues.

>It has everything to do with the kernel.

It has nothing at all to do with the kernel. It has to do with
understanding how to play wav files, and use user level
applications in your operating system. Read the SOUND-HOWTO,
browse the HOWTO directory looking for other sound/audio related
howto's and read them.

Try the follwowing at the bash prompt:

whatis sound

Use glint/rpm/purp or some other package manager tool to scan all
installed packages for programs related to "sound" or "audio".

Go on a web search engine and look for "linux sound applications"

Go on ftpsearch and search for "wplay" or "vplay".

There are some suggestions for getting you started that I hope
will legitimately help you.

Posting such a question to the allready high-volume kernel
development list is not going to get you well liked, or a good
response likely.

My reason for saying this, is that I've been on the kernel
mailing list for a long time, and it is evident from your posting
that you did not understand what the list is for. If you knew
the answer to your problem however, then you'd know also that
this mailing list was not the right place to post. A redhat
mailing list would have been a perfect place.

If you need help getting on a redhat list, let me know and I'd be
glad to give you subscription info, etc..

>> /dev/dsp is the raw dsp device.
>
>I know what /dev/dsp is.

Then you'd know that it takes raw data samples, and that any data
that is sent to it is considered audio sample data. WAV files
are not pure audio sample data. They contain a header which
describes the type of data, the number of channels, the sample
rate, etc... Since /dev/dsp doesn't care about that, it has no
idea what sample rate the audio you are sending it is, and it
plays back data in it's current sample rate, and configuration.
Unless some program changes this, then files that were meant for
playback at a sample rate differing from the dsp's current sample
rate will play back either fast or slow. dumping a wav file into
/dev/dsp that happens to be the same sample rate by coincidence
as the dsp's current sample rate, is likely to play back ok, but
with a click at the beginning. The click is the wav header being
interpreted as audio samples and is just random noise to the dsp.

If you knew all of that, then you wouldn't be catting wav files
into the dsp device and asking why it doesn't work on a mailing
list devoted to kernel development.

>>> It
>> does NOT understand wav files. Catting a wav to it will play the
>> raw sample data in the wav, but it will also treat the wav header
>> as raw data as well, and it plays the data at whatever rate the
>> dsp is set to.
>>
>I know all this. It is not relevant.

If you knew all of that, you wouldn't have asked what you did
ask. It is very relevant. You ask for help for something on a
mailing list that is a very bad place to ask such a thing. You
do so without reading the FAQ you were sent when subscribing to
that mailing list (because it explicitly tells not to post
questions like you posted). And now when someone trys to inform
you that you're in the wrong place, and at the same time try and
help you in the right direction, you mix words, and deny that
you've made a mistake.

We were all newbies at once. It doesn't last forever.

>> Solution? Use a real program to play wav files.
>>
>HINT: Try reading mail before you reply to it.

HINT: Try reading a mailing list charter before subscribing to
it, and try reading a mailing list FAQ before posting to it.
Also, try searching the documentation on your computer, and
searching the web first. If you can't find what you want, or are
just frustrated, then by all means join a mailing list. Just
make sure it is appropriate for your question, and not one that
gets hundreds of mails a day to which yours has no relevance to
the topic or charter of the list.

If you need help still with playing sound again, feel free to ask
me for help, but please don't post to the linux-kernel mailing
list with questions like that. If you aren't sure where to post
something, a redhat list is a good start.

I'd be glad to point out specific programs and URL's to you, but
please, lets not continue the thread with the current tone. Lets
also not continue the thread on this mailing list.

Take care,
TTYL

--
Mike A. Harris  -  Computer Consultant  -  Linux advocate

Linux software galore: http://freshmeat.net

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/