2018-11-15 23:31:39 +00:00
|
|
|
/*****************************************************************************\
|
|
|
|
Snes9x - Portable Super Nintendo Entertainment System (TM) emulator.
|
|
|
|
This file is licensed under the Snes9x License.
|
|
|
|
For further information, consult the LICENSE file in the root directory.
|
|
|
|
\*****************************************************************************/
|
2010-09-25 15:46:12 +00:00
|
|
|
|
|
|
|
#ifndef _APU_H_
|
|
|
|
#define _APU_H_
|
|
|
|
|
2018-08-16 19:04:43 +00:00
|
|
|
#include "../snes9x.h"
|
2010-09-25 15:46:12 +00:00
|
|
|
|
|
|
|
typedef void (*apu_callback) (void *);
|
|
|
|
|
2011-06-26 10:33:14 +00:00
|
|
|
#define SPC_SAVE_STATE_BLOCK_SIZE (1024 * 65)
|
|
|
|
#define SPC_FILE_SIZE (66048)
|
2010-09-25 15:46:12 +00:00
|
|
|
|
|
|
|
bool8 S9xInitAPU (void);
|
|
|
|
void S9xDeinitAPU (void);
|
|
|
|
void S9xResetAPU (void);
|
|
|
|
void S9xSoftResetAPU (void);
|
|
|
|
uint8 S9xAPUReadPort (int);
|
|
|
|
void S9xAPUWritePort (int, uint8);
|
|
|
|
void S9xAPUExecute (void);
|
|
|
|
void S9xAPUEndScanline (void);
|
|
|
|
void S9xAPUSetReferenceTime (int32);
|
|
|
|
void S9xAPUTimingSetSpeedup (int);
|
|
|
|
void S9xAPULoadState (uint8 *);
|
2012-01-20 03:24:36 +00:00
|
|
|
void S9xAPULoadBlarggState(uint8 *oldblock);
|
2010-09-25 15:46:12 +00:00
|
|
|
void S9xAPUSaveState (uint8 *);
|
|
|
|
void S9xDumpSPCSnapshot (void);
|
2011-06-26 10:33:14 +00:00
|
|
|
bool8 S9xSPCDump (const char *);
|
2010-09-25 15:46:12 +00:00
|
|
|
|
2019-02-27 17:02:22 +00:00
|
|
|
bool8 S9xInitSound (int);
|
2010-09-25 15:46:12 +00:00
|
|
|
bool8 S9xOpenSoundDevice (void);
|
|
|
|
|
|
|
|
bool8 S9xSyncSound (void);
|
|
|
|
int S9xGetSampleCount (void);
|
|
|
|
void S9xSetSoundControl (uint8);
|
|
|
|
void S9xSetSoundMute (bool8);
|
|
|
|
void S9xLandSamples (void);
|
|
|
|
void S9xClearSamples (void);
|
|
|
|
bool8 S9xMixSamples (uint8 *, int);
|
|
|
|
void S9xSetSamplesAvailableCallback (apu_callback, void *);
|
2023-03-23 21:53:43 +00:00
|
|
|
void S9xUpdateDynamicRate (int empty = 1, int buffer_size = 2);
|
2010-09-25 15:46:12 +00:00
|
|
|
|
2018-08-05 22:04:06 +00:00
|
|
|
#define DSP_INTERPOLATION_NONE 0
|
|
|
|
#define DSP_INTERPOLATION_LINEAR 1
|
|
|
|
#define DSP_INTERPOLATION_GAUSSIAN 2
|
|
|
|
#define DSP_INTERPOLATION_CUBIC 3
|
|
|
|
#define DSP_INTERPOLATION_SINC 4
|
|
|
|
|
2010-09-25 15:46:12 +00:00
|
|
|
#endif
|