diff options
author | Takamichi Horikawa <takamichiho@gmail.com> | 2017-03-27 23:33:40 +0900 |
---|---|---|
committer | Takamichi Horikawa <takamichiho@gmail.com> | 2017-03-27 23:33:40 +0900 |
commit | 30c59a00956142aafda87c0bdc71c46d1a2218ff (patch) | |
tree | 0bf1c81767dc8edb86ade2a4e224392e2ac5280b /libopna/opnatimer.c | |
parent | 0073f2b8befc6163f2970cb7a01e75fffc95994e (diff) |
add oscilloscope view
Diffstat (limited to 'libopna/opnatimer.c')
-rw-r--r-- | libopna/opnatimer.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/libopna/opnatimer.c b/libopna/opnatimer.c index 789c28e..142176f 100644 --- a/libopna/opnatimer.c +++ b/libopna/opnatimer.c @@ -1,5 +1,6 @@ #include "opnatimer.h" #include "opna.h" +#include "oscillo/oscillo.h" enum { TIMERA_BITS = 10, @@ -65,9 +66,12 @@ void opna_timer_writereg(struct opna_timer *timer, unsigned reg, unsigned val) { } } } -#include <stdio.h> -#include <stdlib.h> + void opna_timer_mix(struct opna_timer *timer, int16_t *buf, unsigned samples) { + opna_timer_mix_oscillo(timer, buf, samples, 0); +} + +void opna_timer_mix_oscillo(struct opna_timer *timer, int16_t *buf, unsigned samples, struct oscillodata *oscillo) { do { unsigned generate_samples = samples; if (timer->timerb_enable && timer->timerb_load) { @@ -82,7 +86,7 @@ void opna_timer_mix(struct opna_timer *timer, int16_t *buf, unsigned samples) { generate_samples = timera_samples; } } - opna_mix(timer->opna, buf, generate_samples); + opna_mix_oscillo(timer->opna, buf, generate_samples, oscillo); if (timer->mix_cb) { timer->mix_cb(timer->mix_userptr, buf, generate_samples); } |