Home » Personal collection » Acorn hard disk » apps » Emulators » !FrodoRsrc/DOCDRE~1

!FrodoRsrc/DOCDRE~1

This website contains an archive of files for the Acorn Electron, BBC Micro, Acorn Archimedes, Commodore 16 and Commodore 64 computers, which Dominic Ford has rescued from his private collection of floppy disks and cassettes.

Some of these files were originally commercial releases in the 1980s and 1990s, but they are now widely available online. I assume that copyright over them is no longer being asserted. If you own the copyright and would like files to be removed, please contact me.

Tape/disk: Home » Personal collection » Acorn hard disk » apps » Emulators
Filename: !FrodoRsrc/DOCDRE~1
Read OK:
File size: 11C1 bytes
Load address: 0000
Exec address: 0000
File contents
THE DIGITAL RENDERER MODULE, V0.00
==================================



This module provides a polling-interface between applications and the sound
system. It should be used if you wish to playback a sample of unknown length
like when emulating another computer's sound system and/or control playback
from applications which might be mapped out during WIMP polls. Otherwise you
better use voice generators.

You tell it the number of channels, sample period and buffer size (as needed for
SWI Sound_Configure) when activating it. The module will then claim a buffer of
the specified size and take over the sound system. Your job as a client is
polling with DigitalRenderer_ReadState and to provide new samples when needed
using DigitalRenderer_NewSample.

DigitalRenderer only supports 8 bit logarithmic sound ATM since I have absolutely
no documentation about 16 bit linear sound (and the PRMs are pretty useless as
far as DMA- and Channel-Handlers are concerned). If any of you provided me with
the necessary docs I might update it.




The DigitalRenderer uses SWI chunk &4f700 (officially registered). It provides
the following SWI calls:







DigitalRenderer_Activate		SWI &4F700
========================


On Entry:
---------

R0	number of channels, will get rounded up to (1,2,4,8).
R1	Sample length (bytes per channel, must be a multiple of 16 bytes)
R2	Sample period (microseconds between reading two consecutive sample bytes)


On Exit:
--------

---


Usage:
------

Your application must call this SWI to take over the sound system. For typical
values of sample length and sample period see PRM 4. Once (successfully)
activated things like the system beep won't work any more.


Errors:
-------

	- already active
	- can't claim memory for buffer / handler
	- bad buffer size (not a multiple of 16)





DigitalRenderer_Deactivate		SWI &4F701
==========================


On Entry:
---------

---


On Exit:
--------

---


Usage:
------

If your application doesn't need sound any more it must return control to the
old handlers by issuing this SWI.


Errors:
-------

	- not active





DigitalRenderer_Pause			SWI &4F702
=====================


On Entry:
---------

---


On Exit:
--------

---


Usage:
------

This SWI suspends sound playback (disabling DMA on sample buffers and so on).
In contrast to deactivating DR this will not install the old handlers but merely
mute the entire sound system.


Errors:
-------

	- not active





DigitalRenderer_Resume			SWI &4F703
======================


On Entry:
---------

---


On Exit:
--------

---


Usage:
------

Call this to resume playback after it was paused.


Errors:
-------

	- not active





DigitalRenderer_GetTables		SWI &4F704
=========================


On Entry:
---------

---


On Exit:
--------

R0	pointer to 8k LinToLog table for translating 13 bit signed integers
	to 8 bit logarithmic samples as required by the VIDC, scaled to the
	currently selected volume (--> SWI Sound_Volume)

R1	Pointer to 256 byte LogScale table for scaling 8 bit logarithmic
	samples according to the currently selected volume.


Errors:
-------

	- not active





DigitalRenderer_ReadState		SWI &4F705
=========================


On Entry:
---------

---


On Exit:
--------

R0	Digital Renderer State. Bits and their meaning when set:

	0:	DigitalRenderer active
	1:	New sample data required
	2:	Buffer overflow occurred


Usage:
------

Call this SWI to poll DigitalRenderer. If Bit 1 is set you have to provide a
new sample buffer by calling DigitalRenderer_NewSample. Bit 2 lets you check
for buffer overflows (i.e. your application took too long to provide the next
sample).





DigitalRenderer_NewSample		SWI &4F706
=========================


On Entry:
---------

R0	Pointer to buffer holding new sample.


On Exit:
--------

---


Usage:
------

Call this when DigitalRenderer_ReadState returned with Bit 1 set. The buffer must
have the correct size (number of channels * Sample length) and contain data that
can be sent directly to the VIDC, i.e. 8 bit logarithmic data, interleafed for
multiple channels.


Errors:
-------

	- not active








LEGAL STUFF:
============


The DigitalRenderer module is Freeware. You may use it for your own programs as
long as this file is included unchanged. I won't be held responsible for any kind
of damage resulting from the use of this module, use it entirely at your own risk.





CONTACT:
========


Andreas Dehmel
Am Schorn 18
82327 Tutzing
Germany

email:	dehmel@informatik.tu-muenchen.de
	(will become invalid soon)
00000000  54 48 45 20 44 49 47 49  54 41 4c 20 52 45 4e 44  |THE DIGITAL REND|
00000010  45 52 45 52 20 4d 4f 44  55 4c 45 2c 20 56 30 2e  |ERER MODULE, V0.|
00000020  30 30 0a 3d 3d 3d 3d 3d  3d 3d 3d 3d 3d 3d 3d 3d  |00.=============|
00000030  3d 3d 3d 3d 3d 3d 3d 3d  3d 3d 3d 3d 3d 3d 3d 3d  |================|
00000040  3d 3d 3d 3d 3d 0a 0a 0a  0a 54 68 69 73 20 6d 6f  |=====....This mo|
00000050  64 75 6c 65 20 70 72 6f  76 69 64 65 73 20 61 20  |dule provides a |
00000060  70 6f 6c 6c 69 6e 67 2d  69 6e 74 65 72 66 61 63  |polling-interfac|
00000070  65 20 62 65 74 77 65 65  6e 20 61 70 70 6c 69 63  |e between applic|
00000080  61 74 69 6f 6e 73 20 61  6e 64 20 74 68 65 20 73  |ations and the s|
00000090  6f 75 6e 64 0a 73 79 73  74 65 6d 2e 20 49 74 20  |ound.system. It |
000000a0  73 68 6f 75 6c 64 20 62  65 20 75 73 65 64 20 69  |should be used i|
000000b0  66 20 79 6f 75 20 77 69  73 68 20 74 6f 20 70 6c  |f you wish to pl|
000000c0  61 79 62 61 63 6b 20 61  20 73 61 6d 70 6c 65 20  |ayback a sample |
000000d0  6f 66 20 75 6e 6b 6e 6f  77 6e 20 6c 65 6e 67 74  |of unknown lengt|
000000e0  68 0a 6c 69 6b 65 20 77  68 65 6e 20 65 6d 75 6c  |h.like when emul|
000000f0  61 74 69 6e 67 20 61 6e  6f 74 68 65 72 20 63 6f  |ating another co|
00000100  6d 70 75 74 65 72 27 73  20 73 6f 75 6e 64 20 73  |mputer's sound s|
00000110  79 73 74 65 6d 20 61 6e  64 2f 6f 72 20 63 6f 6e  |ystem and/or con|
00000120  74 72 6f 6c 20 70 6c 61  79 62 61 63 6b 0a 66 72  |trol playback.fr|
00000130  6f 6d 20 61 70 70 6c 69  63 61 74 69 6f 6e 73 20  |om applications |
00000140  77 68 69 63 68 20 6d 69  67 68 74 20 62 65 20 6d  |which might be m|
00000150  61 70 70 65 64 20 6f 75  74 20 64 75 72 69 6e 67  |apped out during|
00000160  20 57 49 4d 50 20 70 6f  6c 6c 73 2e 20 4f 74 68  | WIMP polls. Oth|
00000170  65 72 77 69 73 65 20 79  6f 75 0a 62 65 74 74 65  |erwise you.bette|
00000180  72 20 75 73 65 20 76 6f  69 63 65 20 67 65 6e 65  |r use voice gene|
00000190  72 61 74 6f 72 73 2e 0a  0a 59 6f 75 20 74 65 6c  |rators...You tel|
000001a0  6c 20 69 74 20 74 68 65  20 6e 75 6d 62 65 72 20  |l it the number |
000001b0  6f 66 20 63 68 61 6e 6e  65 6c 73 2c 20 73 61 6d  |of channels, sam|
000001c0  70 6c 65 20 70 65 72 69  6f 64 20 61 6e 64 20 62  |ple period and b|
000001d0  75 66 66 65 72 20 73 69  7a 65 20 28 61 73 20 6e  |uffer size (as n|
000001e0  65 65 64 65 64 20 66 6f  72 0a 53 57 49 20 53 6f  |eeded for.SWI So|
000001f0  75 6e 64 5f 43 6f 6e 66  69 67 75 72 65 29 20 77  |und_Configure) w|
00000200  68 65 6e 20 61 63 74 69  76 61 74 69 6e 67 20 69  |hen activating i|
00000210  74 2e 20 54 68 65 20 6d  6f 64 75 6c 65 20 77 69  |t. The module wi|
00000220  6c 6c 20 74 68 65 6e 20  63 6c 61 69 6d 20 61 20  |ll then claim a |
00000230  62 75 66 66 65 72 20 6f  66 0a 74 68 65 20 73 70  |buffer of.the sp|
00000240  65 63 69 66 69 65 64 20  73 69 7a 65 20 61 6e 64  |ecified size and|
00000250  20 74 61 6b 65 20 6f 76  65 72 20 74 68 65 20 73  | take over the s|
00000260  6f 75 6e 64 20 73 79 73  74 65 6d 2e 20 59 6f 75  |ound system. You|
00000270  72 20 6a 6f 62 20 61 73  20 61 20 63 6c 69 65 6e  |r job as a clien|
00000280  74 20 69 73 0a 70 6f 6c  6c 69 6e 67 20 77 69 74  |t is.polling wit|
00000290  68 20 44 69 67 69 74 61  6c 52 65 6e 64 65 72 65  |h DigitalRendere|
000002a0  72 5f 52 65 61 64 53 74  61 74 65 20 61 6e 64 20  |r_ReadState and |
000002b0  74 6f 20 70 72 6f 76 69  64 65 20 6e 65 77 20 73  |to provide new s|
000002c0  61 6d 70 6c 65 73 20 77  68 65 6e 20 6e 65 65 64  |amples when need|
000002d0  65 64 0a 75 73 69 6e 67  20 44 69 67 69 74 61 6c  |ed.using Digital|
000002e0  52 65 6e 64 65 72 65 72  5f 4e 65 77 53 61 6d 70  |Renderer_NewSamp|
000002f0  6c 65 2e 0a 0a 44 69 67  69 74 61 6c 52 65 6e 64  |le...DigitalRend|
00000300  65 72 65 72 20 6f 6e 6c  79 20 73 75 70 70 6f 72  |erer only suppor|
00000310  74 73 20 38 20 62 69 74  20 6c 6f 67 61 72 69 74  |ts 8 bit logarit|
00000320  68 6d 69 63 20 73 6f 75  6e 64 20 41 54 4d 20 73  |hmic sound ATM s|
00000330  69 6e 63 65 20 49 20 68  61 76 65 20 61 62 73 6f  |ince I have abso|
00000340  6c 75 74 65 6c 79 0a 6e  6f 20 64 6f 63 75 6d 65  |lutely.no docume|
00000350  6e 74 61 74 69 6f 6e 20  61 62 6f 75 74 20 31 36  |ntation about 16|
00000360  20 62 69 74 20 6c 69 6e  65 61 72 20 73 6f 75 6e  | bit linear soun|
00000370  64 20 28 61 6e 64 20 74  68 65 20 50 52 4d 73 20  |d (and the PRMs |
00000380  61 72 65 20 70 72 65 74  74 79 20 75 73 65 6c 65  |are pretty usele|
00000390  73 73 20 61 73 0a 66 61  72 20 61 73 20 44 4d 41  |ss as.far as DMA|
000003a0  2d 20 61 6e 64 20 43 68  61 6e 6e 65 6c 2d 48 61  |- and Channel-Ha|
000003b0  6e 64 6c 65 72 73 20 61  72 65 20 63 6f 6e 63 65  |ndlers are conce|
000003c0  72 6e 65 64 29 2e 20 49  66 20 61 6e 79 20 6f 66  |rned). If any of|
000003d0  20 79 6f 75 20 70 72 6f  76 69 64 65 64 20 6d 65  | you provided me|
000003e0  20 77 69 74 68 0a 74 68  65 20 6e 65 63 65 73 73  | with.the necess|
000003f0  61 72 79 20 64 6f 63 73  20 49 20 6d 69 67 68 74  |ary docs I might|
00000400  20 75 70 64 61 74 65 20  69 74 2e 0a 0a 0a 0a 0a  | update it......|
00000410  54 68 65 20 44 69 67 69  74 61 6c 52 65 6e 64 65  |The DigitalRende|
00000420  72 65 72 20 75 73 65 73  20 53 57 49 20 63 68 75  |rer uses SWI chu|
00000430  6e 6b 20 26 34 66 37 30  30 20 28 6f 66 66 69 63  |nk &4f700 (offic|
00000440  69 61 6c 6c 79 20 72 65  67 69 73 74 65 72 65 64  |ially registered|
00000450  29 2e 20 49 74 20 70 72  6f 76 69 64 65 73 0a 74  |). It provides.t|
00000460  68 65 20 66 6f 6c 6c 6f  77 69 6e 67 20 53 57 49  |he following SWI|
00000470  20 63 61 6c 6c 73 3a 0a  0a 0a 0a 0a 0a 0a 0a 44  | calls:........D|
00000480  69 67 69 74 61 6c 52 65  6e 64 65 72 65 72 5f 41  |igitalRenderer_A|
00000490  63 74 69 76 61 74 65 09  09 53 57 49 20 26 34 46  |ctivate..SWI &4F|
000004a0  37 30 30 0a 3d 3d 3d 3d  3d 3d 3d 3d 3d 3d 3d 3d  |700.============|
000004b0  3d 3d 3d 3d 3d 3d 3d 3d  3d 3d 3d 3d 0a 0a 0a 4f  |============...O|
000004c0  6e 20 45 6e 74 72 79 3a  0a 2d 2d 2d 2d 2d 2d 2d  |n Entry:.-------|
000004d0  2d 2d 0a 0a 52 30 09 6e  75 6d 62 65 72 20 6f 66  |--..R0.number of|
000004e0  20 63 68 61 6e 6e 65 6c  73 2c 20 77 69 6c 6c 20  | channels, will |
000004f0  67 65 74 20 72 6f 75 6e  64 65 64 20 75 70 20 74  |get rounded up t|
00000500  6f 20 28 31 2c 32 2c 34  2c 38 29 2e 0a 52 31 09  |o (1,2,4,8)..R1.|
00000510  53 61 6d 70 6c 65 20 6c  65 6e 67 74 68 20 28 62  |Sample length (b|
00000520  79 74 65 73 20 70 65 72  20 63 68 61 6e 6e 65 6c  |ytes per channel|
00000530  2c 20 6d 75 73 74 20 62  65 20 61 20 6d 75 6c 74  |, must be a mult|
00000540  69 70 6c 65 20 6f 66 20  31 36 20 62 79 74 65 73  |iple of 16 bytes|
00000550  29 0a 52 32 09 53 61 6d  70 6c 65 20 70 65 72 69  |).R2.Sample peri|
00000560  6f 64 20 28 6d 69 63 72  6f 73 65 63 6f 6e 64 73  |od (microseconds|
00000570  20 62 65 74 77 65 65 6e  20 72 65 61 64 69 6e 67  | between reading|
00000580  20 74 77 6f 20 63 6f 6e  73 65 63 75 74 69 76 65  | two consecutive|
00000590  20 73 61 6d 70 6c 65 20  62 79 74 65 73 29 0a 0a  | sample bytes)..|
000005a0  0a 4f 6e 20 45 78 69 74  3a 0a 2d 2d 2d 2d 2d 2d  |.On Exit:.------|
000005b0  2d 2d 0a 0a 2d 2d 2d 0a  0a 0a 55 73 61 67 65 3a  |--..---...Usage:|
000005c0  0a 2d 2d 2d 2d 2d 2d 0a  0a 59 6f 75 72 20 61 70  |.------..Your ap|
000005d0  70 6c 69 63 61 74 69 6f  6e 20 6d 75 73 74 20 63  |plication must c|
000005e0  61 6c 6c 20 74 68 69 73  20 53 57 49 20 74 6f 20  |all this SWI to |
000005f0  74 61 6b 65 20 6f 76 65  72 20 74 68 65 20 73 6f  |take over the so|
00000600  75 6e 64 20 73 79 73 74  65 6d 2e 20 46 6f 72 20  |und system. For |
00000610  74 79 70 69 63 61 6c 0a  76 61 6c 75 65 73 20 6f  |typical.values o|
00000620  66 20 73 61 6d 70 6c 65  20 6c 65 6e 67 74 68 20  |f sample length |
00000630  61 6e 64 20 73 61 6d 70  6c 65 20 70 65 72 69 6f  |and sample perio|
00000640  64 20 73 65 65 20 50 52  4d 20 34 2e 20 4f 6e 63  |d see PRM 4. Onc|
00000650  65 20 28 73 75 63 63 65  73 73 66 75 6c 6c 79 29  |e (successfully)|
00000660  0a 61 63 74 69 76 61 74  65 64 20 74 68 69 6e 67  |.activated thing|
00000670  73 20 6c 69 6b 65 20 74  68 65 20 73 79 73 74 65  |s like the syste|
00000680  6d 20 62 65 65 70 20 77  6f 6e 27 74 20 77 6f 72  |m beep won't wor|
00000690  6b 20 61 6e 79 20 6d 6f  72 65 2e 0a 0a 0a 45 72  |k any more....Er|
000006a0  72 6f 72 73 3a 0a 2d 2d  2d 2d 2d 2d 2d 0a 0a 09  |rors:.-------...|
000006b0  2d 20 61 6c 72 65 61 64  79 20 61 63 74 69 76 65  |- already active|
000006c0  0a 09 2d 20 63 61 6e 27  74 20 63 6c 61 69 6d 20  |..- can't claim |
000006d0  6d 65 6d 6f 72 79 20 66  6f 72 20 62 75 66 66 65  |memory for buffe|
000006e0  72 20 2f 20 68 61 6e 64  6c 65 72 0a 09 2d 20 62  |r / handler..- b|
000006f0  61 64 20 62 75 66 66 65  72 20 73 69 7a 65 20 28  |ad buffer size (|
00000700  6e 6f 74 20 61 20 6d 75  6c 74 69 70 6c 65 20 6f  |not a multiple o|
00000710  66 20 31 36 29 0a 0a 0a  0a 0a 0a 44 69 67 69 74  |f 16)......Digit|
00000720  61 6c 52 65 6e 64 65 72  65 72 5f 44 65 61 63 74  |alRenderer_Deact|
00000730  69 76 61 74 65 09 09 53  57 49 20 26 34 46 37 30  |ivate..SWI &4F70|
00000740  31 0a 3d 3d 3d 3d 3d 3d  3d 3d 3d 3d 3d 3d 3d 3d  |1.==============|
00000750  3d 3d 3d 3d 3d 3d 3d 3d  3d 3d 3d 3d 0a 0a 0a 4f  |============...O|
00000760  6e 20 45 6e 74 72 79 3a  0a 2d 2d 2d 2d 2d 2d 2d  |n Entry:.-------|
00000770  2d 2d 0a 0a 2d 2d 2d 0a  0a 0a 4f 6e 20 45 78 69  |--..---...On Exi|
00000780  74 3a 0a 2d 2d 2d 2d 2d  2d 2d 2d 0a 0a 2d 2d 2d  |t:.--------..---|
00000790  0a 0a 0a 55 73 61 67 65  3a 0a 2d 2d 2d 2d 2d 2d  |...Usage:.------|
000007a0  0a 0a 49 66 20 79 6f 75  72 20 61 70 70 6c 69 63  |..If your applic|
000007b0  61 74 69 6f 6e 20 64 6f  65 73 6e 27 74 20 6e 65  |ation doesn't ne|
000007c0  65 64 20 73 6f 75 6e 64  20 61 6e 79 20 6d 6f 72  |ed sound any mor|
000007d0  65 20 69 74 20 6d 75 73  74 20 72 65 74 75 72 6e  |e it must return|
000007e0  20 63 6f 6e 74 72 6f 6c  20 74 6f 20 74 68 65 0a  | control to the.|
000007f0  6f 6c 64 20 68 61 6e 64  6c 65 72 73 20 62 79 20  |old handlers by |
00000800  69 73 73 75 69 6e 67 20  74 68 69 73 20 53 57 49  |issuing this SWI|
00000810  2e 0a 0a 0a 45 72 72 6f  72 73 3a 0a 2d 2d 2d 2d  |....Errors:.----|
00000820  2d 2d 2d 0a 0a 09 2d 20  6e 6f 74 20 61 63 74 69  |---...- not acti|
00000830  76 65 0a 0a 0a 0a 0a 0a  44 69 67 69 74 61 6c 52  |ve......DigitalR|
00000840  65 6e 64 65 72 65 72 5f  50 61 75 73 65 09 09 09  |enderer_Pause...|
00000850  53 57 49 20 26 34 46 37  30 32 0a 3d 3d 3d 3d 3d  |SWI &4F702.=====|
00000860  3d 3d 3d 3d 3d 3d 3d 3d  3d 3d 3d 3d 3d 3d 3d 3d  |================|
00000870  0a 0a 0a 4f 6e 20 45 6e  74 72 79 3a 0a 2d 2d 2d  |...On Entry:.---|
00000880  2d 2d 2d 2d 2d 2d 0a 0a  2d 2d 2d 0a 0a 0a 4f 6e  |------..---...On|
00000890  20 45 78 69 74 3a 0a 2d  2d 2d 2d 2d 2d 2d 2d 0a  | Exit:.--------.|
000008a0  0a 2d 2d 2d 0a 0a 0a 55  73 61 67 65 3a 0a 2d 2d  |.---...Usage:.--|
000008b0  2d 2d 2d 2d 0a 0a 54 68  69 73 20 53 57 49 20 73  |----..This SWI s|
000008c0  75 73 70 65 6e 64 73 20  73 6f 75 6e 64 20 70 6c  |uspends sound pl|
000008d0  61 79 62 61 63 6b 20 28  64 69 73 61 62 6c 69 6e  |ayback (disablin|
000008e0  67 20 44 4d 41 20 6f 6e  20 73 61 6d 70 6c 65 20  |g DMA on sample |
000008f0  62 75 66 66 65 72 73 20  61 6e 64 20 73 6f 20 6f  |buffers and so o|
00000900  6e 29 2e 0a 49 6e 20 63  6f 6e 74 72 61 73 74 20  |n)..In contrast |
00000910  74 6f 20 64 65 61 63 74  69 76 61 74 69 6e 67 20  |to deactivating |
00000920  44 52 20 74 68 69 73 20  77 69 6c 6c 20 6e 6f 74  |DR this will not|
00000930  20 69 6e 73 74 61 6c 6c  20 74 68 65 20 6f 6c 64  | install the old|
00000940  20 68 61 6e 64 6c 65 72  73 20 62 75 74 20 6d 65  | handlers but me|
00000950  72 65 6c 79 0a 6d 75 74  65 20 74 68 65 20 65 6e  |rely.mute the en|
00000960  74 69 72 65 20 73 6f 75  6e 64 20 73 79 73 74 65  |tire sound syste|
00000970  6d 2e 0a 0a 0a 45 72 72  6f 72 73 3a 0a 2d 2d 2d  |m....Errors:.---|
00000980  2d 2d 2d 2d 0a 0a 09 2d  20 6e 6f 74 20 61 63 74  |----...- not act|
00000990  69 76 65 0a 0a 0a 0a 0a  0a 44 69 67 69 74 61 6c  |ive......Digital|
000009a0  52 65 6e 64 65 72 65 72  5f 52 65 73 75 6d 65 09  |Renderer_Resume.|
000009b0  09 09 53 57 49 20 26 34  46 37 30 33 0a 3d 3d 3d  |..SWI &4F703.===|
000009c0  3d 3d 3d 3d 3d 3d 3d 3d  3d 3d 3d 3d 3d 3d 3d 3d  |================|
000009d0  3d 3d 3d 0a 0a 0a 4f 6e  20 45 6e 74 72 79 3a 0a  |===...On Entry:.|
000009e0  2d 2d 2d 2d 2d 2d 2d 2d  2d 0a 0a 2d 2d 2d 0a 0a  |---------..---..|
000009f0  0a 4f 6e 20 45 78 69 74  3a 0a 2d 2d 2d 2d 2d 2d  |.On Exit:.------|
00000a00  2d 2d 0a 0a 2d 2d 2d 0a  0a 0a 55 73 61 67 65 3a  |--..---...Usage:|
00000a10  0a 2d 2d 2d 2d 2d 2d 0a  0a 43 61 6c 6c 20 74 68  |.------..Call th|
00000a20  69 73 20 74 6f 20 72 65  73 75 6d 65 20 70 6c 61  |is to resume pla|
00000a30  79 62 61 63 6b 20 61 66  74 65 72 20 69 74 20 77  |yback after it w|
00000a40  61 73 20 70 61 75 73 65  64 2e 0a 0a 0a 45 72 72  |as paused....Err|
00000a50  6f 72 73 3a 0a 2d 2d 2d  2d 2d 2d 2d 0a 0a 09 2d  |ors:.-------...-|
00000a60  20 6e 6f 74 20 61 63 74  69 76 65 0a 0a 0a 0a 0a  | not active.....|
00000a70  0a 44 69 67 69 74 61 6c  52 65 6e 64 65 72 65 72  |.DigitalRenderer|
00000a80  5f 47 65 74 54 61 62 6c  65 73 09 09 53 57 49 20  |_GetTables..SWI |
00000a90  26 34 46 37 30 34 0a 3d  3d 3d 3d 3d 3d 3d 3d 3d  |&4F704.=========|
00000aa0  3d 3d 3d 3d 3d 3d 3d 3d  3d 3d 3d 3d 3d 3d 3d 3d  |================|
00000ab0  0a 0a 0a 4f 6e 20 45 6e  74 72 79 3a 0a 2d 2d 2d  |...On Entry:.---|
00000ac0  2d 2d 2d 2d 2d 2d 0a 0a  2d 2d 2d 0a 0a 0a 4f 6e  |------..---...On|
00000ad0  20 45 78 69 74 3a 0a 2d  2d 2d 2d 2d 2d 2d 2d 0a  | Exit:.--------.|
00000ae0  0a 52 30 09 70 6f 69 6e  74 65 72 20 74 6f 20 38  |.R0.pointer to 8|
00000af0  6b 20 4c 69 6e 54 6f 4c  6f 67 20 74 61 62 6c 65  |k LinToLog table|
00000b00  20 66 6f 72 20 74 72 61  6e 73 6c 61 74 69 6e 67  | for translating|
00000b10  20 31 33 20 62 69 74 20  73 69 67 6e 65 64 20 69  | 13 bit signed i|
00000b20  6e 74 65 67 65 72 73 0a  09 74 6f 20 38 20 62 69  |ntegers..to 8 bi|
00000b30  74 20 6c 6f 67 61 72 69  74 68 6d 69 63 20 73 61  |t logarithmic sa|
00000b40  6d 70 6c 65 73 20 61 73  20 72 65 71 75 69 72 65  |mples as require|
00000b50  64 20 62 79 20 74 68 65  20 56 49 44 43 2c 20 73  |d by the VIDC, s|
00000b60  63 61 6c 65 64 20 74 6f  20 74 68 65 0a 09 63 75  |caled to the..cu|
00000b70  72 72 65 6e 74 6c 79 20  73 65 6c 65 63 74 65 64  |rrently selected|
00000b80  20 76 6f 6c 75 6d 65 20  28 2d 2d 3e 20 53 57 49  | volume (--> SWI|
00000b90  20 53 6f 75 6e 64 5f 56  6f 6c 75 6d 65 29 0a 0a  | Sound_Volume)..|
00000ba0  52 31 09 50 6f 69 6e 74  65 72 20 74 6f 20 32 35  |R1.Pointer to 25|
00000bb0  36 20 62 79 74 65 20 4c  6f 67 53 63 61 6c 65 20  |6 byte LogScale |
00000bc0  74 61 62 6c 65 20 66 6f  72 20 73 63 61 6c 69 6e  |table for scalin|
00000bd0  67 20 38 20 62 69 74 20  6c 6f 67 61 72 69 74 68  |g 8 bit logarith|
00000be0  6d 69 63 0a 09 73 61 6d  70 6c 65 73 20 61 63 63  |mic..samples acc|
00000bf0  6f 72 64 69 6e 67 20 74  6f 20 74 68 65 20 63 75  |ording to the cu|
00000c00  72 72 65 6e 74 6c 79 20  73 65 6c 65 63 74 65 64  |rrently selected|
00000c10  20 76 6f 6c 75 6d 65 2e  0a 0a 0a 45 72 72 6f 72  | volume....Error|
00000c20  73 3a 0a 2d 2d 2d 2d 2d  2d 2d 0a 0a 09 2d 20 6e  |s:.-------...- n|
00000c30  6f 74 20 61 63 74 69 76  65 0a 0a 0a 0a 0a 0a 44  |ot active......D|
00000c40  69 67 69 74 61 6c 52 65  6e 64 65 72 65 72 5f 52  |igitalRenderer_R|
00000c50  65 61 64 53 74 61 74 65  09 09 53 57 49 20 26 34  |eadState..SWI &4|
00000c60  46 37 30 35 0a 3d 3d 3d  3d 3d 3d 3d 3d 3d 3d 3d  |F705.===========|
00000c70  3d 3d 3d 3d 3d 3d 3d 3d  3d 3d 3d 3d 3d 3d 0a 0a  |==============..|
00000c80  0a 4f 6e 20 45 6e 74 72  79 3a 0a 2d 2d 2d 2d 2d  |.On Entry:.-----|
00000c90  2d 2d 2d 2d 0a 0a 2d 2d  2d 0a 0a 0a 4f 6e 20 45  |----..---...On E|
00000ca0  78 69 74 3a 0a 2d 2d 2d  2d 2d 2d 2d 2d 0a 0a 52  |xit:.--------..R|
00000cb0  30 09 44 69 67 69 74 61  6c 20 52 65 6e 64 65 72  |0.Digital Render|
00000cc0  65 72 20 53 74 61 74 65  2e 20 42 69 74 73 20 61  |er State. Bits a|
00000cd0  6e 64 20 74 68 65 69 72  20 6d 65 61 6e 69 6e 67  |nd their meaning|
00000ce0  20 77 68 65 6e 20 73 65  74 3a 0a 0a 09 30 3a 09  | when set:...0:.|
00000cf0  44 69 67 69 74 61 6c 52  65 6e 64 65 72 65 72 20  |DigitalRenderer |
00000d00  61 63 74 69 76 65 0a 09  31 3a 09 4e 65 77 20 73  |active..1:.New s|
00000d10  61 6d 70 6c 65 20 64 61  74 61 20 72 65 71 75 69  |ample data requi|
00000d20  72 65 64 0a 09 32 3a 09  42 75 66 66 65 72 20 6f  |red..2:.Buffer o|
00000d30  76 65 72 66 6c 6f 77 20  6f 63 63 75 72 72 65 64  |verflow occurred|
00000d40  0a 0a 0a 55 73 61 67 65  3a 0a 2d 2d 2d 2d 2d 2d  |...Usage:.------|
00000d50  0a 0a 43 61 6c 6c 20 74  68 69 73 20 53 57 49 20  |..Call this SWI |
00000d60  74 6f 20 70 6f 6c 6c 20  44 69 67 69 74 61 6c 52  |to poll DigitalR|
00000d70  65 6e 64 65 72 65 72 2e  20 49 66 20 42 69 74 20  |enderer. If Bit |
00000d80  31 20 69 73 20 73 65 74  20 79 6f 75 20 68 61 76  |1 is set you hav|
00000d90  65 20 74 6f 20 70 72 6f  76 69 64 65 20 61 0a 6e  |e to provide a.n|
00000da0  65 77 20 73 61 6d 70 6c  65 20 62 75 66 66 65 72  |ew sample buffer|
00000db0  20 62 79 20 63 61 6c 6c  69 6e 67 20 44 69 67 69  | by calling Digi|
00000dc0  74 61 6c 52 65 6e 64 65  72 65 72 5f 4e 65 77 53  |talRenderer_NewS|
00000dd0  61 6d 70 6c 65 2e 20 42  69 74 20 32 20 6c 65 74  |ample. Bit 2 let|
00000de0  73 20 79 6f 75 20 63 68  65 63 6b 0a 66 6f 72 20  |s you check.for |
00000df0  62 75 66 66 65 72 20 6f  76 65 72 66 6c 6f 77 73  |buffer overflows|
00000e00  20 28 69 2e 65 2e 20 79  6f 75 72 20 61 70 70 6c  | (i.e. your appl|
00000e10  69 63 61 74 69 6f 6e 20  74 6f 6f 6b 20 74 6f 6f  |ication took too|
00000e20  20 6c 6f 6e 67 20 74 6f  20 70 72 6f 76 69 64 65  | long to provide|
00000e30  20 74 68 65 20 6e 65 78  74 0a 73 61 6d 70 6c 65  | the next.sample|
00000e40  29 2e 0a 0a 0a 0a 0a 0a  44 69 67 69 74 61 6c 52  |).......DigitalR|
00000e50  65 6e 64 65 72 65 72 5f  4e 65 77 53 61 6d 70 6c  |enderer_NewSampl|
00000e60  65 09 09 53 57 49 20 26  34 46 37 30 36 0a 3d 3d  |e..SWI &4F706.==|
00000e70  3d 3d 3d 3d 3d 3d 3d 3d  3d 3d 3d 3d 3d 3d 3d 3d  |================|
00000e80  3d 3d 3d 3d 3d 3d 3d 0a  0a 0a 4f 6e 20 45 6e 74  |=======...On Ent|
00000e90  72 79 3a 0a 2d 2d 2d 2d  2d 2d 2d 2d 2d 0a 0a 52  |ry:.---------..R|
00000ea0  30 09 50 6f 69 6e 74 65  72 20 74 6f 20 62 75 66  |0.Pointer to buf|
00000eb0  66 65 72 20 68 6f 6c 64  69 6e 67 20 6e 65 77 20  |fer holding new |
00000ec0  73 61 6d 70 6c 65 2e 0a  0a 0a 4f 6e 20 45 78 69  |sample....On Exi|
00000ed0  74 3a 0a 2d 2d 2d 2d 2d  2d 2d 2d 0a 0a 2d 2d 2d  |t:.--------..---|
00000ee0  0a 0a 0a 55 73 61 67 65  3a 0a 2d 2d 2d 2d 2d 2d  |...Usage:.------|
00000ef0  0a 0a 43 61 6c 6c 20 74  68 69 73 20 77 68 65 6e  |..Call this when|
00000f00  20 44 69 67 69 74 61 6c  52 65 6e 64 65 72 65 72  | DigitalRenderer|
00000f10  5f 52 65 61 64 53 74 61  74 65 20 72 65 74 75 72  |_ReadState retur|
00000f20  6e 65 64 20 77 69 74 68  20 42 69 74 20 31 20 73  |ned with Bit 1 s|
00000f30  65 74 2e 20 54 68 65 20  62 75 66 66 65 72 20 6d  |et. The buffer m|
00000f40  75 73 74 0a 68 61 76 65  20 74 68 65 20 63 6f 72  |ust.have the cor|
00000f50  72 65 63 74 20 73 69 7a  65 20 28 6e 75 6d 62 65  |rect size (numbe|
00000f60  72 20 6f 66 20 63 68 61  6e 6e 65 6c 73 20 2a 20  |r of channels * |
00000f70  53 61 6d 70 6c 65 20 6c  65 6e 67 74 68 29 20 61  |Sample length) a|
00000f80  6e 64 20 63 6f 6e 74 61  69 6e 20 64 61 74 61 20  |nd contain data |
00000f90  74 68 61 74 0a 63 61 6e  20 62 65 20 73 65 6e 74  |that.can be sent|
00000fa0  20 64 69 72 65 63 74 6c  79 20 74 6f 20 74 68 65  | directly to the|
00000fb0  20 56 49 44 43 2c 20 69  2e 65 2e 20 38 20 62 69  | VIDC, i.e. 8 bi|
00000fc0  74 20 6c 6f 67 61 72 69  74 68 6d 69 63 20 64 61  |t logarithmic da|
00000fd0  74 61 2c 20 69 6e 74 65  72 6c 65 61 66 65 64 20  |ta, interleafed |
00000fe0  66 6f 72 0a 6d 75 6c 74  69 70 6c 65 20 63 68 61  |for.multiple cha|
00000ff0  6e 6e 65 6c 73 2e 0a 0a  0a 45 72 72 6f 72 73 3a  |nnels....Errors:|
00001000  0a 2d 2d 2d 2d 2d 2d 2d  0a 0a 09 2d 20 6e 6f 74  |.-------...- not|
00001010  20 61 63 74 69 76 65 0a  0a 0a 0a 0a 0a 0a 0a 0a  | active.........|
00001020  4c 45 47 41 4c 20 53 54  55 46 46 3a 0a 3d 3d 3d  |LEGAL STUFF:.===|
00001030  3d 3d 3d 3d 3d 3d 3d 3d  3d 0a 0a 0a 54 68 65 20  |=========...The |
00001040  44 69 67 69 74 61 6c 52  65 6e 64 65 72 65 72 20  |DigitalRenderer |
00001050  6d 6f 64 75 6c 65 20 69  73 20 46 72 65 65 77 61  |module is Freewa|
00001060  72 65 2e 20 59 6f 75 20  6d 61 79 20 75 73 65 20  |re. You may use |
00001070  69 74 20 66 6f 72 20 79  6f 75 72 20 6f 77 6e 20  |it for your own |
00001080  70 72 6f 67 72 61 6d 73  20 61 73 0a 6c 6f 6e 67  |programs as.long|
00001090  20 61 73 20 74 68 69 73  20 66 69 6c 65 20 69 73  | as this file is|
000010a0  20 69 6e 63 6c 75 64 65  64 20 75 6e 63 68 61 6e  | included unchan|
000010b0  67 65 64 2e 20 49 20 77  6f 6e 27 74 20 62 65 20  |ged. I won't be |
000010c0  68 65 6c 64 20 72 65 73  70 6f 6e 73 69 62 6c 65  |held responsible|
000010d0  20 66 6f 72 20 61 6e 79  20 6b 69 6e 64 0a 6f 66  | for any kind.of|
000010e0  20 64 61 6d 61 67 65 20  72 65 73 75 6c 74 69 6e  | damage resultin|
000010f0  67 20 66 72 6f 6d 20 74  68 65 20 75 73 65 20 6f  |g from the use o|
00001100  66 20 74 68 69 73 20 6d  6f 64 75 6c 65 2c 20 75  |f this module, u|
00001110  73 65 20 69 74 20 65 6e  74 69 72 65 6c 79 20 61  |se it entirely a|
00001120  74 20 79 6f 75 72 20 6f  77 6e 20 72 69 73 6b 2e  |t your own risk.|
00001130  0a 0a 0a 0a 0a 0a 43 4f  4e 54 41 43 54 3a 0a 3d  |......CONTACT:.=|
00001140  3d 3d 3d 3d 3d 3d 3d 0a  0a 0a 41 6e 64 72 65 61  |=======...Andrea|
00001150  73 20 44 65 68 6d 65 6c  0a 41 6d 20 53 63 68 6f  |s Dehmel.Am Scho|
00001160  72 6e 20 31 38 0a 38 32  33 32 37 20 54 75 74 7a  |rn 18.82327 Tutz|
00001170  69 6e 67 0a 47 65 72 6d  61 6e 79 0a 0a 65 6d 61  |ing.Germany..ema|
00001180  69 6c 3a 09 64 65 68 6d  65 6c 40 69 6e 66 6f 72  |il:.dehmel@infor|
00001190  6d 61 74 69 6b 2e 74 75  2d 6d 75 65 6e 63 68 65  |matik.tu-muenche|
000011a0  6e 2e 64 65 0a 09 28 77  69 6c 6c 20 62 65 63 6f  |n.de..(will beco|
000011b0  6d 65 20 69 6e 76 61 6c  69 64 20 73 6f 6f 6e 29  |me invalid soon)|
000011c0  0a                                                |.|
000011c1