Changeset 220 for libmpc/branches/r2d/libmpcdec/streaminfo.c
- Timestamp:
- 02/17/07 18:49:10 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libmpc/branches/r2d/libmpcdec/streaminfo.c
r219 r220 84 84 int major = si->encoder_version >> 24; 85 85 int minor = (si->encoder_version >> 16) & 0xFF; 86 int impl = (si->encoder_version >> 8) & 0xFF; 87 int build = si->encoder_version & 0xFF; 86 int build = (si->encoder_version >> 8) & 0xFF; 88 87 char * tmp = "--Stable--"; 89 88 … … 91 90 tmp = "--Unstable--"; 92 91 93 sprintf(si->encoder, "%s %u.%u.%u build %u", tmp, major, minor, impl, 94 build); 92 sprintf(si->encoder, "%s %u.%u build %u", tmp, major, minor, build); 95 93 } 96 94 } … … 164 162 mpc_bits_reader r = *r_in; 165 163 166 mpc_bits_read(&r, 8); // gain version 164 int version = mpc_bits_read(&r, 8); // gain version 165 if (version != 1) // we only know ver 1 166 return; 167 167 si->gain_title = (mpc_uint16_t) mpc_bits_read(&r, 16); 168 168 si->peak_title = (mpc_uint16_t) mpc_bits_read(&r, 16); … … 177 177 { 178 178 mpc_uint32_t CRC; 179 mpc_uint64_t info_len; 180 mpc_bits_reader r = *r_in, r_gain; 179 mpc_bits_reader r = *r_in; 181 180 182 181 CRC = mpc_bits_read(&r, 32); … … 184 183 return MPC_STATUS_FILE; 185 184 186 r_gain = r;187 mpc_bits_get_size(&r, &info_len);188 r_gain.buff += info_len;189 190 185 si->stream_version = mpc_bits_read(&r, 8); 191 186 if (si->stream_version != 8) … … 193 188 194 189 mpc_bits_get_size(&r, &si->samples); 190 mpc_bits_get_size(&r, &si->beg_silence); 191 mpc_bits_get_size(&r, &si->end_silence); 192 195 193 si->is_true_gapless = 1; 196 194 si->sample_freq = samplefreqs[mpc_bits_read(&r, 3)]; 195 si->max_band = mpc_bits_read(&r, 5) + 1; 197 196 si->channels = mpc_bits_read(&r, 4) + 1; 198 si->max_band = mpc_bits_read(&r, 5) + 1;199 197 si->ms = mpc_bits_read(&r, 1); 200 198 si->block_pwr = mpc_bits_read(&r, 3) * 2; … … 206 204 * si->sample_freq / si->samples; 207 205 208 streaminfo_gain(si, &r_gain);209 210 206 return MPC_STATUS_OK; 211 207 } … … 219 215 si->profile_name = mpc_get_version_string(si->profile); 220 216 si->pns = mpc_bits_read(&r, 1); 221 si->encoder_version = mpc_bits_read(&r, 4) << 24; // major217 si->encoder_version = mpc_bits_read(&r, 8) << 24; // major 222 218 si->encoder_version |= mpc_bits_read(&r, 8) << 16; // minor 223 si->encoder_version |= mpc_bits_read(&r, 4) << 8; // implementation224 si->encoder_version |= mpc_bits_read(&r, 8); // build 219 si->encoder_version |= mpc_bits_read(&r, 8) << 8; // build 220 225 221 226 222 mpc_get_encoder_string(si);
Note: See TracChangeset
for help on using the changeset viewer.