From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stas Sergeev Subject: Re: Trying to compile with Stas's sound patch (2) Date: Sun, 24 Sep 2006 21:08:10 +0400 Message-ID: <4516BB7A.7090804@aknet.ru> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Return-path: Sender: linux-msdos-owner@vger.kernel.org List-Id: Content-Type: text/plain; charset="us-ascii"; format="flowed" To: linux-msdos Cc: Jan Willem Stumpel Hello. Jan Willem Stumpel wrote: > I could compile by just changing the declaration of seqbuf_dump to > static void in /usr/include/linux/soundcard.h. Aren't you symlinking /usr/include/linux to /usr/src/linux/include/linux by any chance? Anyway, I added the hack that does what you say, and uploaded the patch. You can now see the file seqbuf.h which tries to insert the "static" keyword in a few places of soundcard.h. Evil but should work. Beware though that I've diffed my working tree this time - in a state it was abandonned. I think it is consistent and should work, but who knows. It looks like it has a huge differences with the previously uploaded patch. > It works very well, for example music in wolf3d and duke3d, and > the old Soundblaster utilities now also work. The goal of that "project" was to find out whether I can emulate the hardware very precisely, yet keep it simple and not to drown in the implementation details. I think I've managed - that code is highly compatible with the real SB16 and every piece of it is about 3-4 times smaller than of the old implementation. > It seems to use a lot of CPU, though. FM and the MIDI synth use a lot of CPU and there is nothing to do with this. I have reduced the sampling rate of the FM synth to 22050 and disabled most of the midi effects, yet it is still quite CPU-hungry. You can't compare it with an old code which simply didn't have the FM synths at all and did use midid for midi. If you set up your DOS progs to not produce the music but only the digital sound, then you can compare. My code will still be more CPU-hungry but not noticeably. The reason is that it does the intermidiate sound processing, buffering, timing control and many more things which the old code did not. There are always the quality vs performance tradeoffs.