mirror of https://github.com/LIJI32/SameBoy.git
Updated GB_set_sample_rate (markdown)
parent
75addc984b
commit
3e7327b1b0
|
@ -10,8 +10,15 @@ In `apu.h`
|
|||
|
||||
## Description
|
||||
|
||||
TBD
|
||||
`GB_set_sample_rate` and `GB_set_sample_rate_by_clocks` control the output sample rate of an emulator instance. `GB_set_sample_rate` sets the sample rate in Hz, and `GB_set_sample_rate_by_clocks` sets it by the number of APU ticks each sample should last. The APU normally ticks at 2MHz (2,097,152Hz) when emulating a non-Super Game Boy [[model|GB_model_t]] without [[overclocking or underclocking|GB_set_clock_multiplier]].
|
||||
|
||||
`GB_get_sample_rate` will return the current sample rate in Hertz.
|
||||
|
||||
## Thread Safety
|
||||
|
||||
`GB_set_sample_rate` must not be called if the instance is being run in another thread, but may be called from the current one (via a callback).
|
||||
|
||||
## See Also
|
||||
|
||||
* [[GB_apu_set_sample_callback]]
|
||||
* [[GB_sample_t]]
|
Loading…
Reference in New Issue