Re: App database, libsynth

Ryan Underwood
2003-07-17T23:09:16Z

Hi Stas,

On Thu, Jul 17, 2003 at 08:07:25PM +0400, Stas Sergeev wrote:
> Hello.
>
> Ryan Underwood wrote:
> >The design is simple to me. The programmer of the
> >application need do nothing but SynthOpen the correct
> >devices, and then SynthWrite the data to them.
> Sounds good. It would probably be a good
> idea to provide an optional way to query
> user's time and request the timer events
> from user. It may be that the user's time
> is different than the real time. dosemu
> uses the real time, but AFAIK dosbox uses
> the emulated time (CPU-emu relative).
> It may also be possible that the real card's
> sampling rate is not very precise (the pcsp
> driver rounds the sampling rate rather cruely),
> in which case you'll have one more timing
> source with which you also have to keep in
> sync. Last time I dealt with all that mess,
> it wasn't very simple (see linux_sound.c :)

Ok, I will look into this.

> >Plan to support the following synths in the library, all
> >can be either hardware or emulated:
> How are you accessing the hardware btw?
> ioperm() ?

For the OPL chips, I use the direct-FM API of OSS/ALSA. (This is not
implemented yet because I do not have a working OPL-chip on my
soundcard. I will swap out my card with SB16 to test it or else hack
the vortex driver to get FM access).

For any other chips, it will have to use iopl(3). I can create ALSA
hwdep driver to handle all the other chips, but I might wait until
people wiht the actual hardware request the capability. :)

But the design of the library does not exclude it.

> >The OPL-chip has an internal IRQ but it can be triggered
> >or cleared by simply writing to the OPL's port.
> AFAIK it is not even connected to any of
> the PIC wires, but why can't you provide an
> optional way to notify the user about an IRQ?
> Simply calling the user's registered call-back
> function might just do the trick, so why not?

You have a good point, I will look into this.

I rewrote the library last few days, now having trouble with some
"chainsaw" noise in wolf3d music. :) Hopefully won't be hard too
fix.

Thanks,

--