-
-
Notifications
You must be signed in to change notification settings - Fork 216
GB_apu_set_sample_callback
Lior Halphon edited this page Nov 30, 2024
·
4 revisions
typedef void (*GB_sample_callback_t)(GB_gameboy_t *gb, GB_sample_t *sample);
void GB_apu_set_sample_callback(GB_gameboy_t *gb, GB_sample_callback_t callback);
In apu.h
This function sets a callback that triggers whenever the emulator instance has a rendered sample ready. The rate at which the callback is called is controlled by the sample rate.
GB_apu_set_sample_callback
is thread-safe and can be called from any thread and context.
The callback isn't called when the sample rate is set to 0.