Lines 35-42
Link Here
|
35 |
m_bErrorDecodingCurrentFrame = FALSE; |
35 |
m_bErrorDecodingCurrentFrame = FALSE; |
36 |
|
36 |
|
37 |
// set the "real" start and finish blocks |
37 |
// set the "real" start and finish blocks |
38 |
m_nStartBlock = (nStartBlock < 0) ? 0 : min(nStartBlock, GetInfo(APE_INFO_TOTAL_BLOCKS)); |
38 |
m_nStartBlock = (nStartBlock < 0) ? 0 : min_macro(nStartBlock, GetInfo(APE_INFO_TOTAL_BLOCKS)); |
39 |
m_nFinishBlock = (nFinishBlock < 0) ? GetInfo(APE_INFO_TOTAL_BLOCKS) : min(nFinishBlock, GetInfo(APE_INFO_TOTAL_BLOCKS)); |
39 |
m_nFinishBlock = (nFinishBlock < 0) ? GetInfo(APE_INFO_TOTAL_BLOCKS) : min_macro(nFinishBlock, GetInfo(APE_INFO_TOTAL_BLOCKS)); |
40 |
m_bIsRanged = (m_nStartBlock != 0) || (m_nFinishBlock != GetInfo(APE_INFO_TOTAL_BLOCKS)); |
40 |
m_bIsRanged = (m_nStartBlock != 0) || (m_nFinishBlock != GetInfo(APE_INFO_TOTAL_BLOCKS)); |
41 |
} |
41 |
} |
42 |
|
42 |
|
Lines 85-91
Link Here
|
85 |
|
85 |
|
86 |
// cap |
86 |
// cap |
87 |
int nBlocksUntilFinish = m_nFinishBlock - m_nCurrentBlock; |
87 |
int nBlocksUntilFinish = m_nFinishBlock - m_nCurrentBlock; |
88 |
const int nBlocksToRetrieve = min(nBlocks, nBlocksUntilFinish); |
88 |
const int nBlocksToRetrieve = min_macro(nBlocks, nBlocksUntilFinish); |
89 |
|
89 |
|
90 |
// get the data |
90 |
// get the data |
91 |
unsigned char * pOutputBuffer = (unsigned char *) pBuffer; |
91 |
unsigned char * pOutputBuffer = (unsigned char *) pBuffer; |
Lines 99-105
Link Here
|
99 |
|
99 |
|
100 |
// analyze how much to remove from the buffer |
100 |
// analyze how much to remove from the buffer |
101 |
const int nFrameBufferBlocks = m_nFrameBufferFinishedBlocks; |
101 |
const int nFrameBufferBlocks = m_nFrameBufferFinishedBlocks; |
102 |
nBlocksThisPass = min(nBlocksLeft, nFrameBufferBlocks); |
102 |
nBlocksThisPass = min_macro(nBlocksLeft, nFrameBufferBlocks); |
103 |
|
103 |
|
104 |
// remove as much as possible |
104 |
// remove as much as possible |
105 |
if (nBlocksThisPass > 0) |
105 |
if (nBlocksThisPass > 0) |
Lines 182-188
Link Here
|
182 |
|
182 |
|
183 |
int nFrameOffsetBlocks = m_nCurrentFrameBufferBlock % GetInfo(APE_INFO_BLOCKS_PER_FRAME); |
183 |
int nFrameOffsetBlocks = m_nCurrentFrameBufferBlock % GetInfo(APE_INFO_BLOCKS_PER_FRAME); |
184 |
int nFrameBlocksLeft = nFrameBlocks - nFrameOffsetBlocks; |
184 |
int nFrameBlocksLeft = nFrameBlocks - nFrameOffsetBlocks; |
185 |
int nBlocksThisPass = min(nFrameBlocksLeft, nBlocksLeft); |
185 |
int nBlocksThisPass = min_macro(nFrameBlocksLeft, nBlocksLeft); |
186 |
|
186 |
|
187 |
// start the frame if we need to |
187 |
// start the frame if we need to |
188 |
if (nFrameOffsetBlocks == 0) |
188 |
if (nFrameOffsetBlocks == 0) |