示例#1
0
void enableAudioPlayback(void) {
	static bool _firstRun = true;

	OSystem_N64 *osys = (OSystem_N64 *)g_system;
	Audio::MixerImpl *localmixer = (Audio::MixerImpl *)osys->getMixer();

	uint32 sampleBufferSize = 3072;

	initAudioInterface(osys->_viClockRate, DEFAULT_SOUND_SAMPLE_RATE, 16, sampleBufferSize);
	osys->_audioBufferSize = getAIBufferSize();

	if (_firstRun) {
		localmixer->setReady(true);
		_firstRun = false;
	}

	disable_interrupts();

	_audioEnabled = true;

	sndCallback();
	sndCallback();

	registerAIhandler(sndCallback); // Lib checks if i try to register it multiple times

	enable_interrupts();
}
示例#2
0
    virtual void initBackend()
    {
        _savefileManager = new DefaultSaveFileManager();
        _overlay.create(640, 480, Graphics::PixelFormat(2, 5, 5, 5, 1, 10, 5, 0, 15));
        _mixer = new Audio::MixerImpl(this, 44100);
        _timerManager = new DefaultTimerManager();

        _mixer->setReady(true);

        BaseBackend::initBackend();
    }
示例#3
0
      virtual void initBackend()
      {
         _savefileManager = new DefaultSaveFileManager(s_saveDir);
#ifdef FRONTEND_SUPPORTS_RGB565
         _overlay.create(RES_W, RES_H, Graphics::PixelFormat(2, 5, 6, 5, 0, 11, 5, 0, 0));
#else
         _overlay.create(RES_W, RES_H, Graphics::PixelFormat(2, 5, 5, 5, 1, 10, 5, 0, 15));
#endif
         _mixer = new Audio::MixerImpl(this, 44100);
         _timerManager = new DefaultTimerManager();

         _mixer->setReady(true);

         BaseBackend::initBackend();
      }