Mercurial > audlegacy
comparison Plugins/Input/console/Ym2413_Emu.h @ 493:c04dff121e1d trunk
[svn] hostile merge, phase 2: reimport based on new plugin code
author | nenolod |
---|---|
date | Tue, 24 Jan 2006 20:19:01 -0800 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
492:ccb68bad47b2 | 493:c04dff121e1d |
---|---|
1 | |
2 // YM2413 FM sound chip emulator interface | |
3 | |
4 // Game_Music_Emu 0.3.0 | |
5 | |
6 #ifndef YM2413_EMU_H | |
7 #define YM2413_EMU_H | |
8 | |
9 class Ym2413_Emu { | |
10 struct OPLL* opll; | |
11 public: | |
12 Ym2413_Emu(); | |
13 ~Ym2413_Emu(); | |
14 | |
15 // Set output sample rate and chip clock rates, in Hz. Returns non-zero | |
16 // if error. | |
17 int set_rate( double sample_rate, double clock_rate ); | |
18 | |
19 // Reset to power-up state | |
20 void reset(); | |
21 | |
22 // Mute voice n if bit n (1 << n) of mask is set | |
23 enum { channel_count = 14 }; | |
24 void mute_voices( int mask ); | |
25 | |
26 // Write 'data' to 'addr' | |
27 void write( int addr, int data ); | |
28 | |
29 // Run and write pair_count samples to output | |
30 typedef short sample_t; | |
31 enum { out_chan_count = 2 }; // stereo | |
32 void run( int pair_count, sample_t* out ); | |
33 }; | |
34 | |
35 #endif | |
36 |