Loading voices now works properly also when ogg support is disabled.
git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@3036 8092fc87-c524-0410-9efc-e669fe64eaf9
This commit is contained in:
@@ -345,9 +345,22 @@ SoundDecoder_Load (uio_DirHandle *dir, char *filename,
|
|||||||
{
|
{
|
||||||
log_add (log_Warning, "SoundDecoder_Load(): Unsupported file type (%s)",
|
log_add (log_Warning, "SoundDecoder_Load(): Unsupported file type (%s)",
|
||||||
filename);
|
filename);
|
||||||
|
|
||||||
|
if (runTime)
|
||||||
|
{
|
||||||
|
runTime = abs (runTime);
|
||||||
|
startTime = 0;
|
||||||
|
funcs = &nula_DecoderVtbl;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
funcs = info->funcs;
|
funcs = info->funcs;
|
||||||
|
}
|
||||||
|
|
||||||
if (!fileExists2 (dir, filename))
|
if (!fileExists2 (dir, filename))
|
||||||
{
|
{
|
||||||
@@ -365,7 +378,7 @@ SoundDecoder_Load (uio_DirHandle *dir, char *filename,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
struct_size = info->funcs->GetStructSize ();
|
struct_size = funcs->GetStructSize ();
|
||||||
if (struct_size < SD_MIN_SIZE)
|
if (struct_size < SD_MIN_SIZE)
|
||||||
struct_size = SD_MIN_SIZE;
|
struct_size = SD_MIN_SIZE;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user