From afdbc97039f2d7b09ff8c07e7ae49f70181bba6c Mon Sep 17 00:00:00 2001 From: kaetemi Date: Mon, 9 Apr 2012 18:42:31 +0200 Subject: [PATCH] Reverted: 2424536ec6f9 The setAsyncLoading function is used for a different purpose. In our case, async means that the file is read on the fly, and otherwise it is fully loaded into memory before being encoded. Synchronous mode is used for example during loading when hard disk access is not guaranteed. --HG-- branch : sound_dev --- code/nel/src/sound/driver/music_buffer.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/code/nel/src/sound/driver/music_buffer.cpp b/code/nel/src/sound/driver/music_buffer.cpp index 40088d49e..6da9d91ec 100644 --- a/code/nel/src/sound/driver/music_buffer.cpp +++ b/code/nel/src/sound/driver/music_buffer.cpp @@ -46,7 +46,8 @@ IMusicBuffer *IMusicBuffer::createMusicBuffer(const std::string &filepath, bool string type = CFile::getExtension(filepath); CIFile *ifile = new CIFile(); - ifile->setAsyncLoading(async); + ifile->setCacheFileOnOpen(!async); + ifile->allowBNPCacheFileOnOpen(!async); ifile->open(lookup); IMusicBuffer *mb = createMusicBuffer(type, ifile, loop);