- Bugfix: Allow the game to use 0 KB files for faking missing WAV speeches

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@4879 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Wanne
2012-01-09 10:40:47 +00:00
parent b17bb900ea
commit a68e81086b
+6 -1
View File
@@ -339,12 +339,17 @@ UINT32 SoundPlayStreamedFile( STR pFilename, SOUNDPARMS *pParms )
{
hFile = FileOpen( pFilename, FILE_ACCESS_READ | FILE_OPEN_EXISTING, FALSE );
if( !hFile )
{
{
SoundLog((CHAR8 *)String(" ERROR in SoundPlayStreamedFile(): Couldnt open '%s'", pFilename ) );
return( SOUND_ERROR );
}
UINT32 uiSize = FileGetSize(hFile);
FileClose(hFile);
if (uiSize == 0)
return ( NO_SAMPLE);
return(SoundStartStream( pFilename, uiChannel, pParms));
}
}