diff options
| author | Callum Prentice <callum@gmail.com> | 2020-09-24 14:45:39 -0700 | 
|---|---|---|
| committer | Callum Prentice <callum@gmail.com> | 2020-09-24 14:45:39 -0700 | 
| commit | 6be1f88a5ef99e1e40bb5701a250ba0728f56005 (patch) | |
| tree | a6d12f9b2f25b4b295999e6f18df422096aa25ca /indra/llaudio | |
| parent | 96e2873bfa2c6b8823aed3b4190c43cd5dab54e6 (diff) | |
Complete the change from lldiskcache -> llfilesystem and then addition of new lldiskcache implementation
Diffstat (limited to 'indra/llaudio')
| -rw-r--r-- | indra/llaudio/llaudiodecodemgr.cpp | 14 | ||||
| -rw-r--r-- | indra/llaudio/llaudioengine.cpp | 4 | 
2 files changed, 9 insertions, 9 deletions
| diff --git a/indra/llaudio/llaudiodecodemgr.cpp b/indra/llaudio/llaudiodecodemgr.cpp index fcffea42a4..ff0aa6e76e 100644 --- a/indra/llaudio/llaudiodecodemgr.cpp +++ b/indra/llaudio/llaudiodecodemgr.cpp @@ -29,7 +29,7 @@  #include "llaudioengine.h"  #include "lllfsthread.h" -#include "lldiskcache.h" +#include "llfilesystem.h"  #include "llstring.h"  #include "lldir.h"  #include "llendianswizzle.h" @@ -93,14 +93,14 @@ protected:  	std::string mOutFilename;  	LLLFSThread::handle_t mFileHandle; -	LLDiskCache *mInFilep; +	LLFileSystem *mInFilep;  	OggVorbis_File mVF;  	S32 mCurrentSection;  };  size_t cache_read(void *ptr, size_t size, size_t nmemb, void *datasource)  { -	LLDiskCache *file = (LLDiskCache *)datasource; +	LLFileSystem *file = (LLFileSystem *)datasource;  	if (file->read((U8*)ptr, (S32)(size * nmemb)))	/*Flawfinder: ignore*/  	{ @@ -115,7 +115,7 @@ size_t cache_read(void *ptr, size_t size, size_t nmemb, void *datasource)  S32 cache_seek(void *datasource, ogg_int64_t offset, S32 whence)  { -	LLDiskCache *file = (LLDiskCache *)datasource; +	LLFileSystem *file = (LLFileSystem *)datasource;  	// cache has 31-bit files  	if (offset > S32_MAX) @@ -151,14 +151,14 @@ S32 cache_seek(void *datasource, ogg_int64_t offset, S32 whence)  S32 cache_close (void *datasource)  { -	LLDiskCache *file = (LLDiskCache *)datasource; +	LLFileSystem *file = (LLFileSystem *)datasource;  	delete file;  	return 0;  }  long cache_tell (void *datasource)  { -	LLDiskCache *file = (LLDiskCache *)datasource; +	LLFileSystem *file = (LLFileSystem *)datasource;  	return file->tell();  } @@ -198,7 +198,7 @@ BOOL LLVorbisDecodeState::initDecode()  	LL_DEBUGS("AudioEngine") << "Initing decode from vfile: " << mUUID << LL_ENDL; -	mInFilep = new LLDiskCache(mUUID, LLAssetType::AT_SOUND); +	mInFilep = new LLFileSystem(mUUID, LLAssetType::AT_SOUND);  	if (!mInFilep || !mInFilep->getSize())  	{  		LL_WARNS("AudioEngine") << "unable to open vorbis source vfile for reading" << LL_ENDL; diff --git a/indra/llaudio/llaudioengine.cpp b/indra/llaudio/llaudioengine.cpp index 9dd752f492..d35f249973 100644 --- a/indra/llaudio/llaudioengine.cpp +++ b/indra/llaudio/llaudioengine.cpp @@ -35,7 +35,7 @@  #include "sound_ids.h"  // temporary hack for min/max distances -#include "lldiskcache.h" +#include "llfilesystem.h"  #include "lldir.h"  #include "llaudiodecodemgr.h"  #include "llassetstorage.h" @@ -1015,7 +1015,7 @@ bool LLAudioEngine::hasDecodedFile(const LLUUID &uuid)  bool LLAudioEngine::hasLocalFile(const LLUUID &uuid)  {  	// See if it's in the cache. -	bool have_local = LLDiskCache::getExists(uuid, LLAssetType::AT_SOUND); +	bool have_local = LLFileSystem::getExists(uuid, LLAssetType::AT_SOUND);  	LL_DEBUGS("AudioEngine") << "sound uuid " << uuid << " exists in cache" << LL_ENDL;  	return have_local;  } | 
