2018-12-03 12:26:02 +01: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-01-27 23:12:09 +01:00
|
|
|
|
|
|
|
#ifndef _APU_H_
|
|
|
|
#define _APU_H_
|
|
|
|
|
2018-08-18 12:04:35 +02:00
|
|
|
#include "../snes9x.h"
|
2010-01-27 23:12:09 +01:00
|
|
|
#include "SNES_SPC.h"
|
|
|
|
|
|
|
|
typedef void (*apu_callback) (void *);
|
|
|
|
|
|
|
|
#define SPC_SAVE_STATE_BLOCK_SIZE (SNES_SPC::state_size + 8)
|
|
|
|
|
|
|
|
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);
|
2010-10-19 04:24:07 +02:00
|
|
|
void S9xAPUAllowTimeOverflow (bool);
|
2010-01-27 23:12:09 +01:00
|
|
|
void S9xAPULoadState (uint8 *);
|
|
|
|
void S9xAPUSaveState (uint8 *);
|
|
|
|
void S9xDumpSPCSnapshot (void);
|
2018-08-11 22:56:31 +02:00
|
|
|
bool8 S9xSPCDump (const char *);
|
2010-01-27 23:12:09 +01:00
|
|
|
|
|
|
|
bool8 S9xInitSound (int, int);
|
|
|
|
bool8 S9xOpenSoundDevice (void);
|
|
|
|
|
|
|
|
bool8 S9xSyncSound (void);
|
|
|
|
int S9xGetSampleCount (void);
|
|
|
|
void S9xSetSoundControl (uint8);
|
|
|
|
void S9xSetSoundMute (bool8);
|
|
|
|
void S9xLandSamples (void);
|
|
|
|
void S9xFinalizeSamples (void);
|
|
|
|
void S9xClearSamples (void);
|
|
|
|
bool8 S9xMixSamples (uint8 *, int);
|
|
|
|
void S9xSetSamplesAvailableCallback (apu_callback, void *);
|
2018-08-23 01:24:37 +02:00
|
|
|
void S9xUpdateDynamicRate (double rate);
|
2010-01-27 23:12:09 +01:00
|
|
|
|
|
|
|
extern SNES_SPC *spc_core;
|
|
|
|
|
2018-12-23 18:14:30 +01:00
|
|
|
#define DSP_INTERPOLATION_NONE 0
|
|
|
|
#define DSP_INTERPOLATION_LINEAR 1
|
|
|
|
#define DSP_INTERPOLATION_GAUSSIAN 2
|
|
|
|
|
2010-01-27 23:12:09 +01:00
|
|
|
#endif
|