cleanups, warning fixes
[fceu.git] / sound.h
CommitLineData
c62d2810 1/* FCE Ultra - NES/Famicom Emulator
2 *
3 * Copyright notice for this file:
4 * Copyright (C) 2002 Ben Parnell
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 */
20
21#define OVERSAMPLESHIFT 4
22#define OVERSAMPLE *16
23#define SND_BUFSIZE 256
24
25
26typedef struct {
27 void (*Fill)(int Count);
28 void (*RChange)(void);
29 void (*Kill)(void);
30} EXPSOUND;
31
32extern EXPSOUND GameExpSound;
33
34extern int64 nesincsizeLL;
35extern uint8 PSG[];
36extern uint32 PSG_base;
37extern int32 PCMIRQCount;
38
39void SetSoundVariables(void);
40void PowerSound(void);
41void ResetSound(void);
42extern uint8 decvolume[];
43
44extern int vdis;
45extern uint8 sqnon;
46extern uint16 nreg;
47
48extern uint8 trimode;
49extern uint8 tricoop;
50extern uint8 PCMBitIndex;
51extern uint32 PCMAddressIndex;
52extern int32 PCMSizeIndex;
53extern uint8 PCMBuffer;
54
55extern uint8 sweepon[2];
56extern int32 curfreq[2];
57
58extern uint8 SweepCount[2];
59extern uint8 DecCountTo1[3];
60
61extern uint8 fcnt;
62extern int32 fhcnt;
63extern int32 fhinc;
64
65void GetSoundBuffer(int32 **W);
66int FlushEmulateSound(void);
67extern uint32 Wave[2048];
68extern int32 WaveFinal[2048];
5232c20c 69extern int16 WaveFinalMono[2048];
c62d2810 70extern uint32 soundtsinc;
71
72void SetNESSoundMap(void);
73void FrameSoundUpdate(void);
74void FixOldSaveStateSFreq(void);