RECORDER: Lower I/O in recorder
This commit is contained in:
parent
3de0b4e3f2
commit
dfcefb3c22
1 changed files with 5 additions and 4 deletions
|
@ -22,6 +22,7 @@
|
||||||
|
|
||||||
#include "common/EventRecorder.h"
|
#include "common/EventRecorder.h"
|
||||||
|
|
||||||
|
#include "common/bufferedstream.h"
|
||||||
#include "common/config-manager.h"
|
#include "common/config-manager.h"
|
||||||
#include "common/random.h"
|
#include "common/random.h"
|
||||||
#include "common/savefile.h"
|
#include "common/savefile.h"
|
||||||
|
@ -171,8 +172,8 @@ void EventRecorder::init() {
|
||||||
if (_recordMode == kRecorderRecord) {
|
if (_recordMode == kRecorderRecord) {
|
||||||
_recordCount = 0;
|
_recordCount = 0;
|
||||||
_recordTimeCount = 0;
|
_recordTimeCount = 0;
|
||||||
_recordFile = g_system->getSavefileManager()->openForSaving(_recordTempFileName);
|
_recordFile = wrapBufferedWriteStream(g_system->getSavefileManager()->openForSaving(_recordTempFileName), 128 * 1024);
|
||||||
_recordTimeFile = g_system->getSavefileManager()->openForSaving(_recordTimeFileName);
|
_recordTimeFile = wrapBufferedWriteStream(g_system->getSavefileManager()->openForSaving(_recordTimeFileName), 128 * 1024);
|
||||||
_recordSubtitles = ConfMan.getBool("subtitles");
|
_recordSubtitles = ConfMan.getBool("subtitles");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -181,8 +182,8 @@ void EventRecorder::init() {
|
||||||
if (_recordMode == kRecorderPlayback) {
|
if (_recordMode == kRecorderPlayback) {
|
||||||
_playbackCount = 0;
|
_playbackCount = 0;
|
||||||
_playbackTimeCount = 0;
|
_playbackTimeCount = 0;
|
||||||
_playbackFile = g_system->getSavefileManager()->openForLoading(_recordFileName);
|
_playbackFile = wrapBufferedSeekableReadStream(g_system->getSavefileManager()->openForLoading(_recordFileName), 128 * 1024, DisposeAfterUse::YES);
|
||||||
_playbackTimeFile = g_system->getSavefileManager()->openForLoading(_recordTimeFileName);
|
_playbackTimeFile = wrapBufferedSeekableReadStream(g_system->getSavefileManager()->openForLoading(_recordTimeFileName), 128 * 1024, DisposeAfterUse::YES);
|
||||||
|
|
||||||
if (!_playbackFile) {
|
if (!_playbackFile) {
|
||||||
warning("Cannot open playback file %s. Playback was switched off", _recordFileName.c_str());
|
warning("Cannot open playback file %s. Playback was switched off", _recordFileName.c_str());
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue