PC Speaker: Difference between revisions

m
-soundhw was removed on version 7, -audiodev is the correct flag. https://www.qemu.org/docs/master/about/removed-features.html#creating-sound-card-devices-using-soundhw-removed-in-7-1
[unchecked revision][unchecked revision]
(→‎The Raw Hardware: Fixed misunderstanding of audio)
m (-soundhw was removed on version 7, -audiodev is the correct flag. https://www.qemu.org/docs/master/about/removed-features.html#creating-sound-card-devices-using-soundhw-removed-in-7-1)
Line 34:
 
== Sample Code ==
This will work on real hardware and in QEMU if it started with <code>-soundhwaudiodev pa,id=speaker -machine pcspk-audiodev=speaker</code>. The code also changes the PIT timer 2 frequency, so you will have to reset that when you're done "beep"ing :)
<source lang="c">
//Play sound using built in speaker
Anonymous user