[colorforth] Re: PCI sound card project. (Was: How is ColorForth different from other forths?)
- Subject: [colorforth] Re: PCI sound card project. (Was: How is ColorForth different from other forths?)
- From: Nick Maroudas <alice@xxxxxxxxxxxxxxxxxxxxxxx>
- Date: Wed, 28 Jan 2004 01:06:14 +0200 (IST)
- Cc: ColorForth List Member <colorforth@xxxxxxxxxxxxxxxxxx>
>
> On Mon, 26 Jan 2004, Nick Maroudas wrote:
>
> > Liewe Tim, Nick hier.
> >
> > Re a wave file player, do you mean the blocks by Bernd Beuster? If so,
> > I could add a comment that shows where CF is NOT different from other
> > forths (the thing you have asked to bear in mind, on this thread).
> >
> > Met beste wense,
> > Nick
> >
To which Neitz replied:
> The wave work was indeed from Bernd Beuster .....
>
> With kind regards,
>
> Tim Neitz.
>
In which case my comment is that, before knowing CF, I wrote in MPE
Forth under DOS with the same aim as Bernd's simplest application - 8bit
mono without DMA - and got the same result: a mysterious lack of control
over the playrate. At that time I blamed the DOS and "hidden interrupts"
but now CF has no OS and no IRPs - so why are these two forths giving the
same result? Was it because both were writing (in obsolete legacy style
blessed by the vendor) to a virtual 8bit SB register at 220 instead of to
the actual 32bitPCI ES "rate controller" reg#10? Alas no, if I switch to
Linux and play my unsigned8bit pcm file at standard CD rate:
play -t .ub -r 44100 myPCM.raw
it sounds, say, middle A 440 Hz. But if I command unusually fine control
at unheard-of high speeds:
play -t .ub -r 344100 myPCM.raw
the hardware obeys by sounding the right high note, but the software
complains "cannot play at 344100, rate set to 48000".
The Linux source code by Thomas Sailer (drivers/sound/es1371.c v2.2) has
this comment about r/w to the ES rate-convertor (lines 559 to 597): "most
of the following here is black magic"!
The moral of this story is that, without good hardware specs, ColorForth
is no different from other forths - nor from C.
Nick
---------------------------------------------------------------------
To unsubscribe, e-mail: colorforth-unsubscribe@xxxxxxxxxxxxxxxxxx
For additional commands, e-mail: colorforth-help@xxxxxxxxxxxxxxxxxx
Main web page - http://www.colorforth.com