decoder/mpcdec: read the bit rate
This was lost in commit 8ead8f7ea
, because this was never implemented
for the new API.
This commit is contained in:
parent
2ecf57cdd9
commit
3e9738dc66
1
NEWS
1
NEWS
@ -14,6 +14,7 @@ ver 0.20 (not yet released)
|
|||||||
* decoder
|
* decoder
|
||||||
- ffmpeg: support ReplayGain and MixRamp
|
- ffmpeg: support ReplayGain and MixRamp
|
||||||
- ffmpeg: support stream tags
|
- ffmpeg: support stream tags
|
||||||
|
- mpcdec: read the bit rate
|
||||||
* output
|
* output
|
||||||
- jack: reduce CPU usage
|
- jack: reduce CPU usage
|
||||||
- pulse: set channel map to WAVE-EX
|
- pulse: set channel map to WAVE-EX
|
||||||
|
@ -193,8 +193,6 @@ mpcdec_decode(Decoder &mpd_decoder, InputStream &is)
|
|||||||
decoder_seek_error(mpd_decoder);
|
decoder_seek_error(mpd_decoder);
|
||||||
}
|
}
|
||||||
|
|
||||||
mpc_uint32_t vbr_update_bits = 0;
|
|
||||||
|
|
||||||
MPC_SAMPLE_FORMAT sample_buffer[MPC_DECODER_BUFFER_LENGTH];
|
MPC_SAMPLE_FORMAT sample_buffer[MPC_DECODER_BUFFER_LENGTH];
|
||||||
mpc_frame_info frame;
|
mpc_frame_info frame;
|
||||||
frame.buffer = (MPC_SAMPLE_FORMAT *)sample_buffer;
|
frame.buffer = (MPC_SAMPLE_FORMAT *)sample_buffer;
|
||||||
@ -214,8 +212,8 @@ mpcdec_decode(Decoder &mpd_decoder, InputStream &is)
|
|||||||
MpcdecSampleTraits::value_type chunk[ARRAY_SIZE(sample_buffer)];
|
MpcdecSampleTraits::value_type chunk[ARRAY_SIZE(sample_buffer)];
|
||||||
mpc_to_mpd_buffer(chunk, sample_buffer, ret);
|
mpc_to_mpd_buffer(chunk, sample_buffer, ret);
|
||||||
|
|
||||||
long bit_rate = vbr_update_bits * audio_format.sample_rate
|
long bit_rate = unsigned(frame.bits) * audio_format.sample_rate
|
||||||
/ 1152 / 1000;
|
/ (1000 * frame.samples);
|
||||||
|
|
||||||
cmd = decoder_data(mpd_decoder, is,
|
cmd = decoder_data(mpd_decoder, is,
|
||||||
chunk, ret * sizeof(chunk[0]),
|
chunk, ret * sizeof(chunk[0]),
|
||||||
|
Loading…
Reference in New Issue
Block a user