Example #1
0
void aviStopRender()
{
    if (!rendering) {
        return;
    }
    rendering = 0;

    aviClose();

    // Restore sound driver
    soundDriverConfig(hwnd, properties->sound.driver);
    emulatorRestartSound();

    // Restore sync method
    properties->emulation.syncMethod = syncMethod;
    switch(properties->emulation.syncMethod) {
    case P_EMU_SYNCNONE:
        frameBufferSetFrameCount(1);
        break;
    case P_EMU_SYNCTOVBLANK:
    case P_EMU_SYNCTOVBLANKASYNC:
        frameBufferSetFrameCount(4);
        break;
    default:
        frameBufferSetFrameCount(3);
    }

    // Restore emu speed
    mixerSetBoardFrequencyFixed(0);
    actionEmuSpeedSet(emuSpeed);

    // Remove board timer
    boardSetPeriodicCallback(NULL, NULL, 0);
}
Example #2
0
void actionSetVolumeStereo(int value) {
    int oldStereo = state.properties->sound.stereo;
    state.properties->sound.stereo = value ? 1 : 0;
    if (oldStereo != state.properties->sound.stereo) {
        emulatorRestartSound();
    }
}
Example #3
0
void aviStartRender(HWND hwndOwner, Properties* prop, Video* vid)
{
    char* filename;

    hwnd       = hwndOwner;
    properties = prop;
    video      = vid;
    syncMethod = properties->emulation.syncMethod;
    emuSpeed   = properties->emulation.speed;

    zoom = properties->video.captureSize == 0 ? 1 : 2;

    actionEmuStop();

    filename = aviGetFilename(properties);
    if (filename == NULL) {
        return;
    }

    boardSetPeriodicCallback(aviVideoCallback, NULL, properties->video.captureFps);
    properties->emulation.syncMethod = P_EMU_SYNCIGNORE;
    mixerSetBoardFrequencyFixed(3579545);
    actionEmuSpeedSet(100);
    frameBufferSetFrameCount(4);

    soundDriverConfig(hwnd, SOUND_DRV_AVI);
    emulatorRestartSound();

    aviOpen(hwnd, filename, properties->video.captureFps);

    actionVideoCapturePlay();

    rendering = 1;

    DialogBox(GetModuleHandle(NULL), MAKEINTRESOURCE(IDD_RENDERVIDEO), hwnd, statusDlgProc);

    actionEmuStop();
    aviStopRender();
}
Example #4
0
void actionVolumeToggleStereo() {
    state.properties->sound.stereo = !state.properties->sound.stereo;

    emulatorRestartSound();
}