Ignore:
Timestamp:
05/09/07 23:11:44 (17 years ago)
Author:
r2d
Message:

Added support for beg_silence (no yet tested as can't make files that use it)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libmpc/trunk/libmpcdec/streaminfo.c

    r311 r314  
    205205        si->bitrate = 0;
    206206
    207         if (si->samples != 0)
     207        if ((si->samples - si->beg_silence) != 0)
    208208                si->average_bitrate = (si->tag_offset - si->header_position) * 8.0
    209                                 *  si->sample_freq / si->samples;
     209                                *  si->sample_freq / (si->samples - si->beg_silence);
    210210
    211211        return MPC_STATUS_OK;
     
    231231mpc_streaminfo_get_length(mpc_streaminfo * si)
    232232{
    233     return (double) si->samples / si->sample_freq;
     233        return (double) (si->samples - si->beg_silence) / si->sample_freq;
    234234}
    235235
    236236mpc_int64_t mpc_streaminfo_get_length_samples(mpc_streaminfo *si)
    237237{
    238         return si->samples;
    239 }
     238        return si->samples - si->beg_silence;
     239}
Note: See TracChangeset for help on using the changeset viewer.