diff options
Diffstat (limited to 'libopna')
-rw-r--r-- | libopna/opna.c | 2 | ||||
-rw-r--r-- | libopna/opna.h | 1 |
2 files changed, 3 insertions, 0 deletions
diff --git a/libopna/opna.c b/libopna/opna.c index 567c913..9f87ff3 100644 --- a/libopna/opna.c +++ b/libopna/opna.c @@ -9,6 +9,7 @@ void opna_reset(struct opna *opna) { opna_drum_reset(&opna->drum); opna_adpcm_reset(&opna->adpcm); opna->mask = 0; + opna->generated_frames = 0; } void opna_writereg(struct opna *opna, unsigned reg, unsigned val) { @@ -42,6 +43,7 @@ void opna_mix_oscillo(struct opna *opna, int16_t *buf, unsigned samples, struct oscillo ? &oscillo[6] : 0, offset); opna_drum_mix(&opna->drum, buf, samples); opna_adpcm_mix(&opna->adpcm, buf, samples); + opna->generated_frames += samples; } unsigned opna_get_mask(const struct opna *opna) { diff --git a/libopna/opna.h b/libopna/opna.h index 2ebca0d..a49a5f8 100644 --- a/libopna/opna.h +++ b/libopna/opna.h @@ -41,6 +41,7 @@ struct opna { struct opna_adpcm adpcm; struct opna_ssg_resampler resampler; unsigned mask; + uint64_t generated_frames; }; void opna_reset(struct opna *opna); |