MCPcopy Create free account
hub / github.com/StrongPC123/Far-Cry-1-Source-Full / ReadFile

Method ReadFile

CrySoundSystem/PCMDecoder.cpp:23–39  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

21}
22
23int CPCMDecoder::ReadFile(void *pBuf, int nSize, int nCount, int *pNewFilePos)
24{
25 if (!m_pFile)
26 return false;
27 int nBytesRead=m_pPak->FRead(pBuf, nSize, nCount, m_pFile);
28 if (nBytesRead!=nCount)
29 {
30 m_nPosBytes=m_pPak->FTell(m_pFile);
31 if (pNewFilePos)
32 *pNewFilePos=m_nPosBytes;
33 return 0;
34 }
35 m_nPosBytes+=nSize*nCount;
36 if (pNewFilePos)
37 *pNewFilePos=m_nPosBytes;
38 return nBytesRead;
39}
40
41bool CPCMDecoder::InitStreamWAV()
42{

Callers 2

GetPCMDataMethod · 0.45
FillPCMBuffer22KHzMethod · 0.45

Calls 2

FReadMethod · 0.45
FTellMethod · 0.45

Tested by

no test coverage detected