diff options
author | Javier <dev.git@javispedro.com> | 2022-02-05 15:43:59 +0100 |
---|---|---|
committer | Javier <dev.git@javispedro.com> | 2022-02-05 15:43:59 +0100 |
commit | 774984e2f00b4ea81060adf7a0625706ddaa42a5 (patch) | |
tree | b28bc676598432953ce1002b93b0d7b584500df2 /emu8k.h | |
parent | 176ec23dd48c50c87e5394b702e2cf0fe72957db (diff) | |
download | vmusic-774984e2f00b4ea81060adf7a0625706ddaa42a5.tar.gz vmusic-774984e2f00b4ea81060adf7a0625706ddaa42a5.zip |
increment the emu's sample count between audio callbacks as per the virtual clock, to aid programs that poll it
Diffstat (limited to 'emu8k.h')
-rw-r--r-- | emu8k.h | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -61,6 +61,11 @@ void emu8k_outb(emu8k_t *emu8k, uint16_t addr, uint8_t val); void emu8k_render(emu8k_t *emu8k, int16_t *buf, size_t frames); +/** Between calls to emu8k_render, the virtual sample count is used to keep the "sample count" register ticking at a reasonable pace. */ +void emu8k_update_virtual_sample_count(emu8k_t *emu8k, uint8_t sample_count); +/* Many programs seem to rely in this counter incrementing frequently, and may hang/error out if it doesn't. + * It is reset to 0 whenever we render and therefore increment the real sample count. + * This means that effectively the sample count register may readjust itself (go back or jump ahead) on _render :(. */ #ifdef __cplusplus } /* extern "C" */ |