prebuffer small sounds to reduce buffering threads. This differs

from preloading; this loads the file directly, before decompression,
so it can load much longer sounds, which avoids any disk access
so no buffering thread is needed.
This commit is contained in:
Glenn Maynard
2007-02-21 11:14:17 +00:00
parent 00f9745c75
commit cfaa20c6fc
4 changed files with 50 additions and 23 deletions
+2 -1
View File
@@ -76,7 +76,8 @@ int RageSoundReader_Chain::LoadSound( RString sPath )
}
RString sError;
RageSoundReader *pReader = RageSoundReader_FileReader::OpenFile( sPath, sError );
bool bPrebuffer;
RageSoundReader *pReader = RageSoundReader_FileReader::OpenFile( sPath, sError, &bPrebuffer );
if( pReader == NULL )
{
LOG->Warn( "RageSoundReader_Chain: error opening sound \"%s\": %s",