Changeset 265 for libmpc/branches/r2d/libmpcdec/streaminfo.c
- Timestamp:
- 04/15/07 23:39:12 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libmpc/branches/r2d/libmpcdec/streaminfo.c
r262 r265 123 123 si->block_pwr = 0; 124 124 125 // This is the gain reference used in old replaygain 126 #define OLD_GAIN_REF 65. 127 125 128 // convert gain info 126 129 if (si->gain_title != 0) { 127 int tmp = (int)(( 65. -si->gain_title / 100.) * 256);130 int tmp = (int)((OLD_GAIN_REF - (mpc_int16_t)si->gain_title / 100.) * 256); 128 131 if (tmp >= (1 << 16) || tmp < 0) tmp = 0; 129 132 si->gain_title = (mpc_int16_t) tmp; … … 131 134 132 135 if (si->gain_album != 0) { 133 int tmp = (int)(( 65. -si->gain_album / 100.) * 256);136 int tmp = (int)((OLD_GAIN_REF - (mpc_int16_t)si->gain_album / 100.) * 256); 134 137 if (tmp >= (1 << 16) || tmp < 0) tmp = 0; 135 138 si->gain_album = (mpc_int16_t) tmp;
Note: See TracChangeset
for help on using the changeset viewer.