mirror of
https://github.com/Fledge68/WiiFlow_Lite.git
synced 2024-11-27 21:54: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()
|
void WavDecoder::OpenFile()
|
||||||
{
|
{
|
||||||
|
DataOffset = 0;
|
||||||
SWaveHdr Header;
|
SWaveHdr Header;
|
||||||
SWaveFmtChunk FmtChunk;
|
SWaveFmtChunk FmtChunk;
|
||||||
memset(&Header, 0, sizeof(SWaveHdr));
|
memset(&Header, 0, sizeof(SWaveHdr));
|
||||||
@ -77,13 +78,19 @@ void WavDecoder::OpenFile()
|
|||||||
CloseFile();
|
CloseFile();
|
||||||
return;
|
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();
|
CloseFile();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
DataOffset = sizeof(SWaveHdr)+le32(FmtChunk.size)+8;
|
DataOffset += sizeof(SWaveHdr) + le32(FmtChunk.size) + 8;
|
||||||
file_fd->seek(DataOffset, SEEK_SET);
|
file_fd->seek(DataOffset, SEEK_SET);
|
||||||
SWaveChunk DataChunk;
|
SWaveChunk DataChunk;
|
||||||
file_fd->read((u8 *) &DataChunk, sizeof(SWaveChunk));
|
file_fd->read((u8 *) &DataChunk, sizeof(SWaveChunk));
|
||||||
|
Loading…
Reference in New Issue
Block a user