Ignore:
Timestamp:
05/11/07 11:46:46 (17 years ago)
Author:
r2d
Message:

bug correction for mpccut (bad decoded sample number)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libmpc/trunk/mpccut/mpccut.c

    r320 r321  
    125125        beg_silence = start_sample % (MPC_FRAME_LENGTH << si.block_pwr);
    126126        start_block = start_sample / (MPC_FRAME_LENGTH << si.block_pwr);
    127         block_num = end_sample / (MPC_FRAME_LENGTH << si.block_pwr) - start_block;
     127        block_num = (end_sample + (MPC_FRAME_LENGTH << si.block_pwr) - 1) /
     128                         (MPC_FRAME_LENGTH << si.block_pwr) - start_block;
    128129        end_sample -= start_block * (MPC_FRAME_LENGTH << si.block_pwr);
    129130
Note: See TracChangeset for help on using the changeset viewer.