mirror of
https://github.com/YGGverse/xash3d-fwgs.git
synced 2025-01-17 18:40:02 +00:00
engine: common: soundlib: added Sound_SupportedFileFormat function
This commit is contained in:
parent
ea2a8b6785
commit
68be8157ea
@ -566,6 +566,7 @@ int FS_GetStreamPos( stream_t *stream );
|
|||||||
void FS_FreeStream( stream_t *stream );
|
void FS_FreeStream( stream_t *stream );
|
||||||
qboolean Sound_Process( wavdata_t **wav, int rate, int width, uint flags );
|
qboolean Sound_Process( wavdata_t **wav, int rate, int width, uint flags );
|
||||||
uint Sound_GetApproxWavePlayLen( const char *filepath );
|
uint Sound_GetApproxWavePlayLen( const char *filepath );
|
||||||
|
qboolean Sound_SupportedFileFormat( const char *fileext );
|
||||||
|
|
||||||
//
|
//
|
||||||
// host.c
|
// host.c
|
||||||
|
@ -290,3 +290,17 @@ qboolean Sound_Process( wavdata_t **wav, int rate, int width, uint flags )
|
|||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
qboolean Sound_SupportedFileFormat( const char *fileext )
|
||||||
|
{
|
||||||
|
const loadwavfmt_t *format;
|
||||||
|
if( COM_CheckStringEmpty( fileext ))
|
||||||
|
{
|
||||||
|
for( format = sound.loadformats; format && format->formatstring; format++ )
|
||||||
|
{
|
||||||
|
if( !Q_stricmp( format->ext, fileext ))
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user