Mercurial > audlegacy-plugins
comparison src/console/Ym2612_Emu.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/Ym2612_Emu.h@13389e613d67 |
children | fb513e10174e |
comparison
equal
deleted
inserted
replaced
11:cff1d04026ae | 12:3da1b8942b8b |
---|---|
1 | |
2 // YM2612 FM sound chip emulator interface | |
3 | |
4 // Game_Music_Emu 0.3.0 | |
5 | |
6 #ifndef YM2612_EMU_H | |
7 #define YM2612_EMU_H | |
8 | |
9 struct Ym2612_Impl; | |
10 | |
11 class Ym2612_Emu { | |
12 Ym2612_Impl* impl; | |
13 public: | |
14 Ym2612_Emu() { impl = 0; } | |
15 ~Ym2612_Emu(); | |
16 | |
17 // Set output sample rate and chip clock rates, in Hz. Returns non-zero | |
18 // if error. | |
19 const char* set_rate( double sample_rate, double clock_rate ); | |
20 | |
21 // Reset to power-up state | |
22 void reset(); | |
23 | |
24 // Mute voice n if bit n (1 << n) of mask is set | |
25 enum { channel_count = 6 }; | |
26 void mute_voices( int mask ); | |
27 | |
28 // Write addr to register 0 then data to register 1 | |
29 void write0( int addr, int data ); | |
30 | |
31 // Write addr to register 2 then data to register 3 | |
32 void write1( int addr, int data ); | |
33 | |
34 // Run and add pair_count samples into current output buffer contents | |
35 typedef short sample_t; | |
36 enum { out_chan_count = 2 }; // stereo | |
37 void run( int pair_count, sample_t* out ); | |
38 }; | |
39 | |
40 #endif | |
41 |