qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] Re: [PATCH] PC speaker emulation


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

I forgot to mention, that you must call QEMU with the switch '- soundhw pcspk' to enable PC speaker emulation.

Sorry
Jo.

Joachim Henke wrote:
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?

Thanks
Jo.

--
Joachim Henke
http://he-jo.net/




reply via email to

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