diff --git a/GB_set_highpass_filter_mode.md b/GB_set_highpass_filter_mode.md index fdf1fb6..81540c5 100644 --- a/GB_set_highpass_filter_mode.md +++ b/GB_set_highpass_filter_mode.md @@ -9,14 +9,22 @@ typedef enum { } GB_highpass_mode_t; ``` -void GB_set_highpass_filter_mode([[GB_gameboy_t]] *gb, [[GB_highpass_mode_t]] mode); +void GB_set_highpass_filter_mode([[GB_gameboy_t]] *gb, GB_highpass_mode_t mode); In `apu.h` ## Description -TBD +A real Game Boy has its audio output going through a high-pass filter before reaching the built-in speaker or headphones, which removes the variable DC-offset the digital output generates. This function controls the high-pass filter the emulator instance uses: + +* `GB_HIGHPASS_OFF`: No high-pass filter is used, the DC offset remains +* `GB_HIGHPASS_ACCURATE`: A simple high-pass filter is applied; this setting best represents the hardware behavior +* `GB_HIGHPASS_REMOVE_DC_OFFSET`: The DC offset is separated from the actual wave form, and a simple high-pass filter is only applied to the DC offset part ## Thread Safety `GB_set_highpass_filter_mode` is thread-safe and can be called from any thread and context. + +## Notes + +Keep in mind that the DC offset is not constant prior to applying the high-pass filter. \ No newline at end of file