From 3e7327b1b08c0e568d07f155e059a5028c7d51de Mon Sep 17 00:00:00 2001 From: Lior Halphon Date: Thu, 28 Nov 2024 22:27:27 +0200 Subject: [PATCH] Updated GB_set_sample_rate (markdown) --- GB_set_sample_rate.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/GB_set_sample_rate.md b/GB_set_sample_rate.md index f13e147..baadfc7 100644 --- a/GB_set_sample_rate.md +++ b/GB_set_sample_rate.md @@ -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]] \ No newline at end of file