Fixed: Display an error if unable to open a ogg file
This commit is contained in:
parent
1cee50c6cf
commit
26c720395b
1 changed files with 7 additions and 4 deletions
|
@ -110,16 +110,19 @@ bool IAudioDecoder::getInfo(const std::string &filepath, std::string &artist, st
|
||||||
CIFile ifile;
|
CIFile ifile;
|
||||||
ifile.setCacheFileOnOpen(false);
|
ifile.setCacheFileOnOpen(false);
|
||||||
ifile.allowBNPCacheFileOnOpen(false);
|
ifile.allowBNPCacheFileOnOpen(false);
|
||||||
ifile.open(lookup);
|
if (ifile.open(lookup))
|
||||||
return CAudioDecoderVorbis::getInfo(&ifile, artist, title);
|
return CAudioDecoderVorbis::getInfo(&ifile, artist, title);
|
||||||
|
|
||||||
|
nlwarning("Unable to open: '%s'", filepath.c_str());
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
nlwarning("Music file type unknown: '%s'", type_lower.c_str());
|
nlwarning("Music file type unknown: '%s'", type_lower.c_str());
|
||||||
|
}
|
||||||
|
|
||||||
artist.clear(); title.clear();
|
artist.clear(); title.clear();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
/// Get audio/container extensions that are currently supported by the nel sound library.
|
/// Get audio/container extensions that are currently supported by the nel sound library.
|
||||||
void IAudioDecoder::getMusicExtensions(std::vector<std::string> &extensions)
|
void IAudioDecoder::getMusicExtensions(std::vector<std::string> &extensions)
|
||||||
|
|
Loading…
Reference in a new issue