Showing changes from revision #1 to #2:
Added | Removed | Changed
Entry | |
---|---|
R0 | 2 (Reason code) |
R1 | Sample rate index (1+) |
Exit | |
---|---|
R2 | Corresponding sample rate value (1/1024Hz) |
All other registers preserved |
This call can be used to read the sample rate value that corresponds to a given index.
Internally sample rates are sorted in increasing order. This allows a binary chop or similar algorithm to be used to find the sample rate that’s closest to a given desired rate without having to iterate through all the available rates.
This SWI should only be used if Sound_Mode 0 indicates that 16 bit sound output is supported.
Sample rate indices are 1-based. Sound_SampleRate 0 can be used to find the number of available rates, i.e. the maximum permissible value for R1.
Sample rates are measured in units of 1/1024Hz. E.g. 22050Hz would be represented as 22050*1024 = 22579200.
Sound_SampleRate 3 can be used to set the current sample rate.