Changeset 350 for libmpc/trunk/libmpcdec/streaminfo.c
- Timestamp:
- 09/23/07 19:20:36 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libmpc/trunk/libmpcdec/streaminfo.c
r347 r350 131 131 // convert gain info 132 132 if (si->gain_title != 0) { 133 int tmp = OLD_GAIN_REF * 256 - ((int)(mpc_int16_t)si->gain_title * 256 + 50) / 100;133 int tmp = (int)((OLD_GAIN_REF - (mpc_int16_t)si->gain_title / 100.) * 256. + .5); 134 134 if (tmp >= (1 << 16) || tmp < 0) tmp = 0; 135 135 si->gain_title = (mpc_int16_t) tmp; … … 137 137 138 138 if (si->gain_album != 0) { 139 int tmp = OLD_GAIN_REF * 256 - ((int)(mpc_int16_t)si->gain_album * 256 + 50) / 100;139 int tmp = (int)((OLD_GAIN_REF - (mpc_int16_t)si->gain_album / 100.) * 256. + .5); 140 140 if (tmp >= (1 << 16) || tmp < 0) tmp = 0; 141 141 si->gain_album = (mpc_int16_t) tmp;
Note: See TracChangeset
for help on using the changeset viewer.