qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH] PC speaker emulation (fixed point)


From: Fabrice Bellard
Subject: Re: [Qemu-devel] [PATCH] PC speaker emulation (fixed point)
Date: Tue, 24 Jan 2006 22:45:44 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20040913

Sebastian Kaliszewski wrote:
Joachim Henke wrote:

Ok, these are really strong arguments. Thanks a lot for your interesting statements! I'll do some testing on square waves and will post an updated patch, as I am also not totally satisfied with the current sound myself.


One little suggestion...

Real PC-speaker is rather poor source of sound, and I also noticed, that sound cards which took PC-speaker sound for themselves (some SB-clones did route PC-speaker sound into thier own output) liked to low-pass filter the resulting audio. So to make things as real as feasible, use your wave table to store something like square wave with rounded corners -- maybe sth like pow(sin(x), 0.2) (i.e. sinus rooted to 5th degree) will sound pleasant enough.

If you want to model the real PC speaker, the best to do is to generate a square signal and to pass it thru a low pass filter with a cut off frequency of a few kHz. Then you could even be able to play samples thru the simulated PC speaker using the tricks used in old MSDOS programs, provided QEMU implements a precise cycle counter (it will come someday !).

Fabrice.




reply via email to

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