[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH] PC speaker emulation

From: Joachim Henke
Subject: [Qemu-devel] [PATCH] PC speaker emulation
Date: Thu, 19 Jan 2006 00:05:02 +0100

Ok, here is it - my first attempt for emulating the PC speaker using the audio API. This needs some testing, tough it seems to work well with full system emulation on my iMac G5. Would be nice if someone could test this in a different environment (on a PC, in user mode, ...).

With my patch, QEMU plays a sine wave, that is calculated on base of the count value in PIT channel 2. So it only supports tone generation (typical for system beeps), but no sample playing using two PITs (I mean that noisy sound from old DOS programs :) - It would probably be not that easy to emulate this in realtime.

The attached zip file also includes a DOS program, that came with an old computer book. It plays a long tone scale, each tone half a second. You can use this for testing, but maybe you have some more interesting applications.

The patch is probably a bit too hackish to be included yet. As I am a bit busy these days, I just sent it as a request for comments. I would prefer to use a sample rate of 32000 instead of 44100 Hz, but when playing with sample rates of 22050 or 32000 Hz, QEMU becomes so slow and unusable, that I need to kill it. I don't know if this is something Mac specific. malc, could you please have a look, if I use your audio API correctly?


Fabrice Bellard wrote:

I think it would not be difficult to add a real speaker emulation with the audio API written by malc, at least to simulate tone generation using the PIT.



Joachim Henke

Attachment: speaker.zip
Description: Zip archive

reply via email to

[Prev in Thread] Current Thread [Next in Thread]