1/*****************************************************************************\
2 Snes9x - Portable Super Nintendo Entertainment System (TM) emulator.
3 This file is licensed under the Snes9x License.
4 For further information, consult the LICENSE file in the root directory.
5\*****************************************************************************/
6
7#ifndef _APU_H_
8#define _APU_H_
9
10#include "../snes9x.h"
11
12typedef void (*apu_callback) (void *);
13
14#define SPC_SAVE_STATE_BLOCK_SIZE (1024 * 65)
15#define SPC_FILE_SIZE (66048)
16
17bool8 S9xInitAPU (void);
18void S9xDeinitAPU (void);
19void S9xResetAPU (void);
20void S9xSoftResetAPU (void);
21uint8 S9xAPUReadPort (int);
22void S9xAPUWritePort (int, uint8);
23void S9xAPUExecute (void);
24void S9xAPUEndScanline (void);
25void S9xAPUSetReferenceTime (int32);
26void S9xAPUTimingSetSpeedup (int);
27void S9xAPULoadState (uint8 *);
28void S9xAPULoadBlarggState(uint8 *oldblock);
29void S9xAPUSaveState (uint8 *);
30void S9xDumpSPCSnapshot (void);
31bool8 S9xSPCDump (const char *);
32
33bool8 S9xInitSound (int);
34bool8 S9xOpenSoundDevice (void);
35
36bool8 S9xSyncSound (void);
37int S9xGetSampleCount (void);
38void S9xSetSoundControl (uint8);
39void S9xSetSoundMute (bool8);
40void S9xLandSamples (void);
41void S9xClearSamples (void);
42bool8 S9xMixSamples (uint8 *, int);
43void S9xSetSamplesAvailableCallback (apu_callback, void *);
44void S9xUpdateDynamicRate (int, int);
45
46#define DSP_INTERPOLATION_NONE 0
47#define DSP_INTERPOLATION_LINEAR 1
48#define DSP_INTERPOLATION_GAUSSIAN 2
49#define DSP_INTERPOLATION_CUBIC 3
50#define DSP_INTERPOLATION_SINC 4
51
52#endif
53