Commit 6968ab81 authored by David Reid's avatar David Reid

Update dr_mp3.

parent c35bc17f
// MP3 audio decoder. Public domain. See "unlicense" statement at the end of this file. // MP3 audio decoder. Public domain. See "unlicense" statement at the end of this file.
// dr_mp3 - v0.3.0 - 2018-08-25 // dr_mp3 - v0.3.1 - 2018-08-25
// //
// David Reid - mackron@gmail.com // David Reid - mackron@gmail.com
// //
...@@ -1982,7 +1982,7 @@ int drmp3dec_decode_frame(drmp3dec *dec, const unsigned char *mp3, int mp3_bytes ...@@ -1982,7 +1982,7 @@ int drmp3dec_decode_frame(drmp3dec *dec, const unsigned char *mp3, int mp3_bytes
{ {
memset(scratch.grbuf[0], 0, 576*2*sizeof(float)); memset(scratch.grbuf[0], 0, 576*2*sizeof(float));
drmp3_L3_decode(dec, &scratch, scratch.gr_info + igr*info->channels, info->channels); drmp3_L3_decode(dec, &scratch, scratch.gr_info + igr*info->channels, info->channels);
drmp3d_synth_granule(dec->qmf_state, scratch.grbuf[0], 18, info->channels, pcm, scratch.syn[0]); drmp3d_synth_granule(dec->qmf_state, scratch.grbuf[0], 18, info->channels, (drmp3d_sample_t*)pcm, scratch.syn[0]);
} }
} }
drmp3_L3_save_reservoir(dec, &scratch); drmp3_L3_save_reservoir(dec, &scratch);
...@@ -2001,7 +2001,7 @@ int drmp3dec_decode_frame(drmp3dec *dec, const unsigned char *mp3, int mp3_bytes ...@@ -2001,7 +2001,7 @@ int drmp3dec_decode_frame(drmp3dec *dec, const unsigned char *mp3, int mp3_bytes
{ {
i = 0; i = 0;
drmp3_L12_apply_scf_384(sci, sci->scf + igr, scratch.grbuf[0]); drmp3_L12_apply_scf_384(sci, sci->scf + igr, scratch.grbuf[0]);
drmp3d_synth_granule(dec->qmf_state, scratch.grbuf[0], 12, info->channels, pcm, scratch.syn[0]); drmp3d_synth_granule(dec->qmf_state, scratch.grbuf[0], 12, info->channels, (drmp3d_sample_t*)pcm, scratch.syn[0]);
memset(scratch.grbuf[0], 0, 576*2*sizeof(float)); memset(scratch.grbuf[0], 0, 576*2*sizeof(float));
pcm = DRMP3_OFFSET_PTR(pcm, sizeof(drmp3d_sample_t)*384*info->channels); pcm = DRMP3_OFFSET_PTR(pcm, sizeof(drmp3d_sample_t)*384*info->channels);
} }
...@@ -2888,6 +2888,9 @@ void drmp3_free(void* p) ...@@ -2888,6 +2888,9 @@ void drmp3_free(void* p)
// REVISION HISTORY // REVISION HISTORY
// =============== // ===============
// //
// v0.3.1 - 2018-08-25
// - Fix C++ build.
//
// v0.3.0 - 2018-08-25 // v0.3.0 - 2018-08-25
// - Bring up to date with minimp3. This has a minor API change: the "pcm" parameter of drmp3dec_decode_frame() has // - Bring up to date with minimp3. This has a minor API change: the "pcm" parameter of drmp3dec_decode_frame() has
// been changed from short* to void* because it can now output both s16 and f32 samples, depending on whether or // been changed from short* to void* because it can now output both s16 and f32 samples, depending on whether or
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment