The fact, that we can only reproduce frequencies up to half of sampling frequency, has already been dealt with since the first patch I posted (2006-01-18).

I chose to use a sample rate of 32000 Hz, which should be sufficient for our purpose. So we can handle PIT count values down to 75. Previous patches also played the highest possible frequency for PIT count values 1-74. I changed this with the square wave patch: It plays "silence" for frequencies above 16 kHz now.

Currently, I want to keep things as simple as possible. I see no need for producing more overhead to emulate low-pass filtering for plain tone generation. We can implement this, when we have realtime PIT emulation, which would make full PC speaker emulation possible. But, as you told, there are different kinds of PC speakers anyway.

I'm currently improving the patch a bit and will post one, that could be included into CVS, soon.


Sebastian Kaliszewski wrote:
No. Typical cutoff freq is where components of the signal are attenuated by 3dB (i.e. are half as loud). At 2 times taht frequency they'll be attenuated by 3 + A dB, where A is filter's rate in dB/octave. Typical 1st order filter is 6dB/octave, 2nd order is 12dB/octave, etc. Typical soundards used no more than 2nd order filter.

But, if you want to have your path behave really nicely, you should simply not generate at all waves at frequencies above half of current output sampling rate -- those can't be reproducted -- instead significant distortion will be generated (google for Nyquist frequency).

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


_______________________________________________
Qemu-devel mailing list
Qemu-devel@nongnu.org
http://lists.nongnu.org/mailman/listinfo/qemu-devel

Reply via email to