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 | |
12 | typedef void (*apu_callback) (void *); |
13 | |
14 | #define SPC_SAVE_STATE_BLOCK_SIZE (1024 * 65) |
15 | #define SPC_FILE_SIZE (66048) |
16 | |
17 | bool8 S9xInitAPU (void); |
18 | void S9xDeinitAPU (void); |
19 | void S9xResetAPU (void); |
20 | void S9xSoftResetAPU (void); |
21 | uint8 S9xAPUReadPort (int); |
22 | void S9xAPUWritePort (int, uint8); |
23 | void S9xAPUExecute (void); |
24 | void S9xAPUEndScanline (void); |
25 | void S9xAPUSetReferenceTime (int32); |
26 | void S9xAPUTimingSetSpeedup (int); |
27 | void S9xAPULoadState (uint8 *); |
28 | void S9xAPULoadBlarggState(uint8 *oldblock); |
29 | void S9xAPUSaveState (uint8 *); |
30 | void S9xDumpSPCSnapshot (void); |
31 | bool8 S9xSPCDump (const char *); |
32 | |
33 | bool8 S9xInitSound (int); |
34 | bool8 S9xOpenSoundDevice (void); |
35 | |
36 | bool8 S9xSyncSound (void); |
37 | int S9xGetSampleCount (void); |
38 | void S9xSetSoundControl (uint8); |
39 | void S9xSetSoundMute (bool8); |
40 | void S9xLandSamples (void); |
41 | void S9xClearSamples (void); |
42 | bool8 S9xMixSamples (uint8 *, int); |
43 | void S9xSetSamplesAvailableCallback (apu_callback, void *); |
44 | void 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 |