Changeset 314 for libmpc/trunk/libmpcdec/streaminfo.c
- Timestamp:
- 05/09/07 23:11:44 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libmpc/trunk/libmpcdec/streaminfo.c
r311 r314 205 205 si->bitrate = 0; 206 206 207 if ( si->samples!= 0)207 if ((si->samples - si->beg_silence) != 0) 208 208 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); 210 210 211 211 return MPC_STATUS_OK; … … 231 231 mpc_streaminfo_get_length(mpc_streaminfo * si) 232 232 { 233 return (double) si->samples/ si->sample_freq;233 return (double) (si->samples - si->beg_silence) / si->sample_freq; 234 234 } 235 235 236 236 mpc_int64_t mpc_streaminfo_get_length_samples(mpc_streaminfo *si) 237 237 { 238 return si->samples ;239 } 238 return si->samples - si->beg_silence; 239 }
Note: See TracChangeset
for help on using the changeset viewer.