mirror of
https://github.com/Fledge68/WiiFlow_Lite.git
synced 2024-11-27 13:44:15 +01:00
-added banner sound support for avatar and maybe more games
This commit is contained in:
parent
f44356b0c3
commit
efaa4ea569
@ -59,6 +59,7 @@ WavDecoder::~WavDecoder()
|
||||
|
||||
void WavDecoder::OpenFile()
|
||||
{
|
||||
DataOffset = 0;
|
||||
SWaveHdr Header;
|
||||
SWaveFmtChunk FmtChunk;
|
||||
memset(&Header, 0, sizeof(SWaveHdr));
|
||||
@ -77,13 +78,19 @@ void WavDecoder::OpenFile()
|
||||
CloseFile();
|
||||
return;
|
||||
}
|
||||
else if(FmtChunk.magicFMT != 'fmt ')
|
||||
if(FmtChunk.magicFMT == 'bext') //Stupid metadata
|
||||
{
|
||||
DataOffset += le32(FmtChunk.size) + 8;
|
||||
file_fd->seek(sizeof(SWaveHdr) + le32(FmtChunk.size) + 8, SEEK_SET);
|
||||
file_fd->read((u8 *)&FmtChunk, sizeof(SWaveFmtChunk));
|
||||
}
|
||||
if(FmtChunk.magicFMT != 'fmt ')
|
||||
{
|
||||
CloseFile();
|
||||
return;
|
||||
}
|
||||
|
||||
DataOffset = sizeof(SWaveHdr)+le32(FmtChunk.size)+8;
|
||||
DataOffset += sizeof(SWaveHdr) + le32(FmtChunk.size) + 8;
|
||||
file_fd->seek(DataOffset, SEEK_SET);
|
||||
SWaveChunk DataChunk;
|
||||
file_fd->read((u8 *) &DataChunk, sizeof(SWaveChunk));
|
||||
|
Loading…
Reference in New Issue
Block a user