From 449f2b429ea43db20b024b30027627f0fdee4634 Mon Sep 17 00:00:00 2001 From: Mike Pavone Date: Sun, 2 Jun 2013 22:30:41 -0700 Subject: Initial stab at feedback --- ym2612.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'ym2612.c') diff --git a/ym2612.c b/ym2612.c index ea95bc2..7199565 100644 --- a/ym2612.c +++ b/ym2612.c @@ -155,7 +155,7 @@ void ym_init(ym2612_context * context, uint32_t sample_rate, uint32_t clock_rate } } -#define YM_VOLUME_DIVIDER 1 +#define YM_VOLUME_DIVIDER 2 void ym_run(ym2612_context * context, uint32_t to_cycle) { @@ -267,7 +267,9 @@ void ym_run(ym2612_context * context, uint32_t to_cycle) switch (op % 4) { case 0://Operator 1 - //TODO: Feedback + if (chan->feedback) { + mod = operator->output >> (10-chan->feedback); + } break; case 1://Operator 3 switch(chan->algorithm) -- cgit v1.2.3