Fixed audio module not building
Former-commit-id: 87276c55c56142b8d10b13f2de19ee93b8148432
This commit is contained in:
parent
0b8394c6dc
commit
369c735596
|
|
@ -59,7 +59,17 @@ namespace
|
||||||
|
|
||||||
static SF_VIRTUAL_IO callbacks = {GetSize, Seek, Read, nullptr, Tell};
|
static SF_VIRTUAL_IO callbacks = {GetSize, Seek, Read, nullptr, Tell};
|
||||||
|
|
||||||
bool NzLoader_sndfile_Check(NzInputStream& stream, const NzSoundBufferParams& parameters)
|
bool IsSupported(const NzString& extension)
|
||||||
|
{
|
||||||
|
static std::set<NzString> supportedExtensions = {
|
||||||
|
"aiff", "au", "avr", "caf", "flac", "htk", "ircam", "mat4", "mat5", "mpc2k",
|
||||||
|
"nist","ogg", "pvf", "raw", "rf64", "sd2", "sds", "svx", "voc", "w64", "wav", "wve"
|
||||||
|
};
|
||||||
|
|
||||||
|
return supportedExtensions.find(extension) != supportedExtensions.end();
|
||||||
|
}
|
||||||
|
|
||||||
|
bool Check(NzInputStream& stream, const NzSoundBufferParams& parameters)
|
||||||
{
|
{
|
||||||
NazaraUnused(parameters);
|
NazaraUnused(parameters);
|
||||||
|
|
||||||
|
|
@ -74,7 +84,7 @@ namespace
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool NzLoader_sndfile_Load(NzSoundBuffer* soundBuffer, NzInputStream& stream, const NzSoundBufferParams& parameters)
|
bool Load(NzSoundBuffer* soundBuffer, NzInputStream& stream, const NzSoundBufferParams& parameters)
|
||||||
{
|
{
|
||||||
NazaraUnused(parameters);
|
NazaraUnused(parameters);
|
||||||
|
|
||||||
|
|
@ -131,12 +141,10 @@ namespace
|
||||||
|
|
||||||
void NzLoaders_sndfile_Register()
|
void NzLoaders_sndfile_Register()
|
||||||
{
|
{
|
||||||
NzSoundBufferLoader::RegisterLoader("aiff,au,avr,caf,flac,htk,ircam,mat4,mat5,mpc2k,nist,ogg,paf,pvf,raw,rf64,sd2,sds,svx,voc,w64,wav,wve",
|
NzSoundBufferLoader::RegisterLoader(IsSupported, Check, Load);
|
||||||
NzLoader_sndfile_Check, NzLoader_sndfile_Load);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void NzLoaders_sndfile_Unregister()
|
void NzLoaders_sndfile_Unregister()
|
||||||
{
|
{
|
||||||
NzSoundBufferLoader::UnregisterLoader("aiff,au,avr,caf,flac,htk,ircam,mat4,mat5,mpc2k,nist,ogg,paf,pvf,raw,rf64,sd2,sds,svx,voc,w64,wav,wve",
|
NzSoundBufferLoader::UnregisterLoader(IsSupported, Check, Load);
|
||||||
NzLoader_sndfile_Check, NzLoader_sndfile_Load);
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue