Showing changes from revision #1 to #2:
Added | Removed | Changed
Entry | |
---|---|
R0 | New volume (1-127) |
Or 0 to read current volume |
Exit | |
---|---|
R0 | Previous volume (1-127) |
This SWI is used to read or set the master volume of the 8 bit sound system.
Volume is specified using a logarithmic scale, with 127 representing a 1x multiplier. For every 16 you subtract from the base volume of 127, the linear output will be halved. I.e.:
Volume | Multiplier |
---|---|
127 | 1 |
127-16 | 1/2 |
127-32 | 1/4 |
127-48 | 1/8 |
127-64 | 1/16 |
127-80 | 1/32 |
127-96 | 1/64 |
127-112 | 1/128 |
The setting made here or via *Volume influences the return values of SWIs Sound_SoundLog and Sound_LogScale, and it also controls the contents of the linear-to-log and log amplification tables that are available at offsets +8 and +12 of the sound channel handler block (available via Sound_Configure). Well-behaved voice generators should make use of one of the above interfaces to determine the volume scale they should use when they generate their output.