mirror of
https://github.com/cemu-project/Cemu.git
synced 2025-07-09 00:11:17 +12:00
adjust assert
This commit is contained in:
parent
c8b4e48120
commit
49b28c16a8
1 changed files with 2 additions and 2 deletions
|
@ -8,7 +8,7 @@ BootSoundReader::BootSoundReader(FSCVirtualFile* bootsndFile, sint32 blockSize)
|
||||||
fsc_readFile(bootsndFile, &loopPoint, 4);
|
fsc_readFile(bootsndFile, &loopPoint, 4);
|
||||||
buffer.resize(blockSize / sizeof(sint16));
|
buffer.resize(blockSize / sizeof(sint16));
|
||||||
bufferBE.resize(blockSize / sizeof(sint16be));
|
bufferBE.resize(blockSize / sizeof(sint16be));
|
||||||
if(blockSize % sizeof(sint16be) != 0)
|
if(blockSize % (sizeof(sint16be) * 2) != 0)
|
||||||
cemu_assert_suspicious();
|
cemu_assert_suspicious();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -18,7 +18,7 @@ sint16* BootSoundReader::getSamples()
|
||||||
while(totalRead < blockSize)
|
while(totalRead < blockSize)
|
||||||
{
|
{
|
||||||
auto read = fsc_readFile(bootsndFile, bufferBE.data(), blockSize - totalRead);
|
auto read = fsc_readFile(bootsndFile, bufferBE.data(), blockSize - totalRead);
|
||||||
if (read % sizeof(sint16be) != 0)
|
if (read % (sizeof(sint16be) * 2) != 0)
|
||||||
cemu_assert_suspicious();
|
cemu_assert_suspicious();
|
||||||
|
|
||||||
std::copy_n(bufferBE.begin(), read / sizeof(sint16be), buffer.begin() + (totalRead / sizeof(sint16)));
|
std::copy_n(bufferBE.begin(), read / sizeof(sint16be), buffer.begin() + (totalRead / sizeof(sint16)));
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue