Procházet zdrojové kódy

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.
marauder2k7 před 1 rokem
rodič
revize
6bc4ace2e5
1 změnil soubory, kde provedl 1 přidání a 1 odebrání
  1. 1 1
      Engine/source/sfx/media/sfxSndStream.cpp

+ 1 - 1
Engine/source/sfx/media/sfxSndStream.cpp

@@ -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