Updated GB_set_sample_rate (markdown)

Lior Halphon 2024-11-28 22:27:27 +02:00
parent 75addc984b
commit 3e7327b1b0
1 changed files with 8 additions and 1 deletions

@ -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]]