[fpc-pascal]Yet another bug in Win32 CRT unit
Rich Pasco
pasco at acm.org
Thu Mar 7 02:08:21 CET 2002
Jonas Maebe wrote:
> From a win32 program, it's not possible to
> write directly to the PC speaker ports like under Dos, so you either have
> to use win32 api calls (and it seems there aren't any which allow you to
> specify the tone/duration), or you have to write a VxD (since that one
> runs with kernel privileges and as such it should be able to access the
> hardware directly which in) which in turn can be called from FPC programs.
Yikes, now I understand the problem.
Here's an idea: How about code that would generate a waveform "on the
fly" (in this case, a square wave would do) and then play it through
the Windows API (as if it were a WAV file)? Or maybe a (very short)
MIDI sequence through the MIDI device? I know these are through the
Windows sound system, not the PC speaker, but at least ported apps
would sound about like they were supposed to.
- Rich
More information about the fpc-pascal
mailing list