// Media module
#include <xtl.h>
#include "xbinput.h"
#include "burner.h"
extern int nAppVirtualFps;
extern int nVidImageWidth;		// Memory buffer size
extern int nVidImageHeight;
extern int GameInpInit();
extern int InputInit();
extern int GameInpDefault();
extern int ConfigGameLoad(bool bOverWrite);
extern int ConfigGameSave(bool bSave);
extern TCHAR fpsstring[8];
extern int SegaInputInit();

void AudioInit() {
	if (!bAudOkay) {
		AudSoundInit();					// Init Sound (not critical if it fails)
	}
	nBurnSoundRate = 0;					// Assume no sound
	pBurnSoundOut = NULL;
	if (bAudOkay) {
		nBurnSoundRate = nAudSampleRate;
		nBurnSoundLen = nAudSegLen;
	}
}

int MediaInit()
{
	nAppVirtualFps = nBurnFPS;
	SegaInputInit();
	nMaxPlayers = BurnDrvGetMaxPlayers();
	GameInpInit();
	ConfigGameLoad(true);
	InputMake(true);
	GameInpDefault();
	ConfigGameSave(true);
	return 0;
}

