Mercurial > audlegacy-plugins
comparison src/console/Gb_Oscs.h @ 316:fb513e10174e trunk
[svn] - merge libconsole-blargg into mainline libconsole:
+ obsoletes plugins-ugly:sapplug
author | nenolod |
---|---|
date | Thu, 30 Nov 2006 19:54:33 -0800 |
parents | 3da1b8942b8b |
children |
comparison
equal
deleted
inserted
replaced
315:2294f3a6f136 | 316:fb513e10174e |
---|---|
1 | |
2 // Private oscillators used by Gb_Apu | 1 // Private oscillators used by Gb_Apu |
3 | 2 |
4 // Gb_Snd_Emu 0.1.4 | 3 // Gb_Snd_Emu 0.1.5 |
5 | |
6 #ifndef GB_OSCS_H | 4 #ifndef GB_OSCS_H |
7 #define GB_OSCS_H | 5 #define GB_OSCS_H |
8 | 6 |
9 #include "blargg_common.h" | 7 #include "blargg_common.h" |
10 #include "Blip_Buffer.h" | 8 #include "Blip_Buffer.h" |
50 int sweep_freq; | 48 int sweep_freq; |
51 int phase; | 49 int phase; |
52 | 50 |
53 void reset(); | 51 void reset(); |
54 void clock_sweep(); | 52 void clock_sweep(); |
55 void run( gb_time_t, gb_time_t, int playing ); | 53 void run( blip_time_t, blip_time_t, int playing ); |
56 }; | 54 }; |
57 | 55 |
58 struct Gb_Noise : Gb_Env | 56 struct Gb_Noise : Gb_Env |
59 { | 57 { |
60 typedef Blip_Synth<blip_med_quality,1> Synth; | 58 typedef Blip_Synth<blip_med_quality,1> Synth; |
61 Synth const* synth; | 59 Synth const* synth; |
62 unsigned bits; | 60 unsigned bits; |
63 | 61 |
64 void run( gb_time_t, gb_time_t, int playing ); | 62 void run( blip_time_t, blip_time_t, int playing ); |
65 }; | 63 }; |
66 | 64 |
67 struct Gb_Wave : Gb_Osc | 65 struct Gb_Wave : Gb_Osc |
68 { | 66 { |
69 typedef Blip_Synth<blip_med_quality,1> Synth; | 67 typedef Blip_Synth<blip_med_quality,1> Synth; |
71 int wave_pos; | 69 int wave_pos; |
72 enum { wave_size = 32 }; | 70 enum { wave_size = 32 }; |
73 BOOST::uint8_t wave [wave_size]; | 71 BOOST::uint8_t wave [wave_size]; |
74 | 72 |
75 void write_register( int, int ); | 73 void write_register( int, int ); |
76 void run( gb_time_t, gb_time_t, int playing ); | 74 void run( blip_time_t, blip_time_t, int playing ); |
77 }; | 75 }; |
78 | 76 |
79 inline void Gb_Env::reset() | 77 inline void Gb_Env::reset() |
80 { | 78 { |
81 env_delay = 0; | 79 env_delay = 0; |
82 Gb_Osc::reset(); | 80 Gb_Osc::reset(); |
83 } | 81 } |
84 | 82 |
85 #endif | 83 #endif |
86 |