Update sfxSndStream.cpp

fix for stereo files (2d sound files) frames report back as bytesPerSample * channels

which for us is bytesPerSample. This needs to be applied to the return from read so sfx resource knows we have read all the info.
This commit is contained in:
marauder2k7 2024-03-24 13:51:04 +00:00
parent d2ac25195f
commit 6bc4ace2e5

View file

@ -113,7 +113,7 @@ U32 SFXSndStream::read(U8* buffer, U32 length)
Con::errorf("SFXSndStream - read: %s", sf_strerror(sndFile));
}
return framesRead;
return framesRead * mFormat.getBytesPerSample();
}
bool SFXSndStream::isEOS() const