Mercurial > audlegacy-plugins
diff src/console/Sms_Oscs.h @ 12:3da1b8942b8b trunk
[svn] - remove src/Input src/Output src/Effect src/General src/Visualization src/Container
author | nenolod |
---|---|
date | Mon, 18 Sep 2006 03:14:20 -0700 |
parents | src/Input/console/Sms_Oscs.h@13389e613d67 |
children | fb513e10174e |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/console/Sms_Oscs.h Mon Sep 18 03:14:20 2006 -0700 @@ -0,0 +1,52 @@ + +// Private oscillators used by Sms_Apu + +// Sms_Snd_Emu 0.1.3 + +#ifndef SMS_OSCS_H +#define SMS_OSCS_H + +#include "blargg_common.h" +#include "Blip_Buffer.h" + +struct Sms_Osc +{ + Blip_Buffer* outputs [4]; // NULL, right, left, center + Blip_Buffer* output; + int output_select; + + int delay; + int last_amp; + int volume; + + Sms_Osc(); + void reset(); +}; + +struct Sms_Square : Sms_Osc +{ + int period; + int phase; + + typedef Blip_Synth<blip_good_quality,1> Synth; + const Synth* synth; + + void reset(); + void run( sms_time_t, sms_time_t ); +}; + +struct Sms_Noise : Sms_Osc +{ + const int* period; + unsigned shifter; + unsigned tap; + + typedef Blip_Synth<blip_med_quality,1> Synth; + Synth synth; + + void reset(); + void run( sms_time_t, sms_time_t ); +}; + +#endif +