moros icon indicating copy to clipboard operation
moros copied to clipboard

Add Sound Blaster 16 driver

Open vinc opened this issue 8 months ago • 2 comments

  • 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

vinc avatar Sep 02 '25 20:09 vinc

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

vinc avatar Sep 02 '25 20:09 vinc

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.

vinc avatar Sep 02 '25 20:09 vinc