mirror of
https://github.com/1dot13/source.git
synced 2026-08-26 14:30:26 +02:00
- 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:
@@ -339,12 +339,17 @@ UINT32 SoundPlayStreamedFile( STR pFilename, SOUNDPARMS *pParms )
|
|||||||
{
|
{
|
||||||
hFile = FileOpen( pFilename, FILE_ACCESS_READ | FILE_OPEN_EXISTING, FALSE );
|
hFile = FileOpen( pFilename, FILE_ACCESS_READ | FILE_OPEN_EXISTING, FALSE );
|
||||||
if( !hFile )
|
if( !hFile )
|
||||||
{
|
{
|
||||||
SoundLog((CHAR8 *)String(" ERROR in SoundPlayStreamedFile(): Couldnt open '%s'", pFilename ) );
|
SoundLog((CHAR8 *)String(" ERROR in SoundPlayStreamedFile(): Couldnt open '%s'", pFilename ) );
|
||||||
return( SOUND_ERROR );
|
return( SOUND_ERROR );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
UINT32 uiSize = FileGetSize(hFile);
|
||||||
FileClose(hFile);
|
FileClose(hFile);
|
||||||
|
|
||||||
|
if (uiSize == 0)
|
||||||
|
return ( NO_SAMPLE);
|
||||||
|
|
||||||
return(SoundStartStream( pFilename, uiChannel, pParms));
|
return(SoundStartStream( pFilename, uiChannel, pParms));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user