Is it possible to write a sound file to /dev/dsp and hear the right sound? I've tried it with .WAV but it isn't working. If it's possible please tell me which sound format it is
Hmm.. So i asked that because i've ported sound driver from linux. So now it's working under VMware and i'd like to play something easily. I just don't know how
And for those who wonder: yes, the old OSS drivers work exactly that way. You dump raw data into /dev/dsp and it gets played. Format/samplerate/whatever can be configured with various ioctl()-calls (surprise?).
If one just dumps a .wav into /dev/dsp, one will normally hear it, but it will be played with the default settings (which might be 8-bit unsigned ?-Law mono 22050 or pretty much anything else) which naturally can do all kinds of funny things with the sound. In addition, there will be a burst of noise in the beginning of the sound, because .wav files contain a header, which is not audio data, and throwing that through speakers makes no sense. Finally, this is assuming the .wav isn't compressed, which actually is possible.
mystran wrote:
And for those who wonder: yes, the old OSS drivers work exactly that way. You dump raw data into /dev/dsp and it gets played. Format/samplerate/whatever can be configured with various ioctl()-calls (surprise?).
Common way for computer nerd to test whether the sound card works:
mystran wrote:
And for those who wonder: yes, the old OSS drivers work exactly that way. You dump raw data into /dev/dsp and it gets played. Format/samplerate/whatever can be configured with various ioctl()-calls (surprise?).
Common way for computer nerd to test whether the sound card works: