1 /* 2 * nes_psg.h 3 * 4 * NES sound emulation 5 */ 6 7 /* $Id: nes_psg.h,v 1.6 2000/10/02 14:18:54 nyef Exp $ */ 8 9 #ifndef NES_PSG_H 10 #define NES_PSG_H 11 12 #include "types.h" 13 14 void nes_psg_init(void); 15 void nes_psg_done(void); 16 17 void nes_psg_frame(void); 18 19 typedef void (*psg_writefunc)(u8 value); 20 21 extern psg_writefunc sound_regs[16]; 22 23 void nes_psg_write_control(u8 value); 24 25 /* 26 * nes_psg_quality is used to control the sound playback rate. 27 * anything < 1 disables sound. 28 * 1 is 22050 Hz. 29 * 2 is 44100 Hz. 30 * anything > 2 is 44100 Hz. 31 * these values subject to change without notice. 32 */ 33 extern int nes_psg_quality; 34 35 #endif /* NES_PSG_H */ 36 37 /* 38 * $Log: nes_psg.h,v $ 39 * Revision 1.6 2000/10/02 14:18:54 nyef 40 * rewrote interface 41 * 42 * Revision 1.5 2000/05/07 02:12:31 nyef 43 * added "extern" to some variable declarations 44 * 45 * Revision 1.4 1999/02/14 18:28:18 nyef 46 * added a function pointer array for writing the sound regs 47 * added a function prototype for writing the control reg 48 * 49 * Revision 1.3 1998/12/06 04:18:22 nyef 50 * added preliminary sound quality (playback rate) support. 51 * 52 * Revision 1.2 1998/08/30 20:36:42 nyef 53 * added vsync hook procedure. 54 * 55 * Revision 1.1 1998/08/22 00:24:40 nyef 56 * Initial revision 57 * 58 */ 59