moros
moros copied to clipboard
Add Sound Blaster 16 driver
- https://wiki.osdev.org/Sound_Blaster_16
- https://pdos.csail.mit.edu/6.828/2006/readings/hardware/SoundBlaster.pdf
- https://github.com/qemu/qemu/blob/master/hw/audio/sb16.c
We can now play a sound with either:
> read sound.pcm => /dev/snd/buf
> copy sound.pcm /dev/snd/buf
And stop it with either:
> read /dev/null => /dev/snd/buf
> copy /dev/null /dev/snd/buf
Currently we can only play 22.1 kHz unsigned 8-bit mono PCM sounds.
They can be converted to the right format with the following command on Unix:
sox sound.mp3 -r 22050 -c 1 -b 8 -e unsigned-integer -t raw sound.pcm
The next step will be to add device file at /dev/snd/ini to set or get the current format.