How can I play sound through the PC speaker?

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
mrosdev
Member
Member
Posts: 28
Joined: Mon Jun 01, 2020 8:15 am

How can I play sound through the PC speaker?

Post by mrosdev »

I'm trying to implement a simple audio driver for my os. I tried using some codes on the OSDev wiki but it didn't work for QEMU. :(
Klakap
Member
Member
Posts: 297
Joined: Sat Mar 10, 2018 10:16 am

Re: How can I play sound through the PC speaker?

Post by Klakap »

If you want sound from QEMU, you must use option -soundhw pcspk

Code: Select all

qemu-system-i386 -soundhw pcspk -hda youros.img
PC speaker driver can seem like https://github.com/Klaykap/BleskOS/blob ... peaker.asm
Post Reply