Entry | |
---|---|
R0 | Channels for 8 bit sound, rounded up to 1,2,4 or 8 |
or 0 to preserve previous value | |
R1 | Samples per channel (in bytes) |
or 0 to preserve previous value | |
R2 | Sample period (in microseconds per channel) |
or 0 to preserve previous value | |
R3 | Pointer to Channel Handler |
or 0 to preserve previous value | |
R4 | Pointer to Scheduler |
or 0 to preserve previous value |
Exit | |
---|---|
R0-R4 | Previous values |
Used to configure the number of sound channels, the sample period and the sample length. It can also be used by specialised applications to replace the default Channel Handler and Scheduler.
All current settings may be read by using zero for all input parameters.
R0 only controls the number of 8 bit sound channels; the 16 bit sound system always has two channels (left and right).
Although R2 can be used to specify the sample period, the preferred method to set or read the sample rate for RISC OS 3.5 and above is to use Sound_SampleRate.
If no Channel Handler and/or Scheduler are installed, the previous pointers returned in R3 / R4 will be invalid. Validity may be confirmed by checking the lowest two bits of the relevant register are zero, ie TST R3, #3
Service_Sound 8 will be issued if the sound configuration changes as a result of this call.