Mercurial > audlegacy
comparison Plugins/Input/console/Sms_Oscs.h @ 90:252843aac42f trunk
[svn] Import the initial sources for console music support.
author | nenolod |
---|---|
date | Tue, 01 Nov 2005 19:57:26 -0800 |
parents | |
children | 7c5e886205ef |
comparison
equal
deleted
inserted
replaced
89:feeda0dda3ce | 90:252843aac42f |
---|---|
1 | |
2 // Private oscillators used by Sms_Apu | |
3 | |
4 // Sms_Snd_Emu 0.1.3. Copyright (C) 2003-2005 Shay Green. GNU LGPL license. | |
5 | |
6 #ifndef SMS_OSCS_H | |
7 #define SMS_OSCS_H | |
8 | |
9 #include "Blip_Buffer.h" | |
10 | |
11 struct Sms_Osc | |
12 { | |
13 Blip_Buffer* outputs [4]; // NULL, right, left, center | |
14 Blip_Buffer* output; | |
15 int output_select; | |
16 | |
17 int delay; | |
18 int last_amp; | |
19 int volume; | |
20 | |
21 Sms_Osc(); | |
22 void reset(); | |
23 virtual void run( sms_time_t start, sms_time_t end ) = 0; | |
24 }; | |
25 | |
26 struct Sms_Square : Sms_Osc | |
27 { | |
28 int period; | |
29 int phase; | |
30 | |
31 typedef Blip_Synth<blip_good_quality,64 * 2> Synth; | |
32 const Synth* synth; | |
33 | |
34 Sms_Square(); | |
35 void reset(); | |
36 void run( sms_time_t, sms_time_t ); | |
37 }; | |
38 | |
39 struct Sms_Noise : Sms_Osc | |
40 { | |
41 const int* period; | |
42 unsigned shifter; | |
43 unsigned tap; | |
44 | |
45 typedef Blip_Synth<blip_med_quality,64 * 2> Synth; | |
46 Synth synth; | |
47 | |
48 Sms_Noise(); | |
49 void reset(); | |
50 void run( sms_time_t, sms_time_t ); | |
51 }; | |
52 | |
53 #endif | |
54 |