hmmm
This commit is contained in:
parent
0bf0d57738
commit
dc27c996fb
2
extern/adpcm-xq-s/adpcm-lib.c
vendored
2
extern/adpcm-xq-s/adpcm-lib.c
vendored
|
@ -340,7 +340,7 @@ int adpcm_encode_block (void *p, uint8_t *outbuf, size_t *outbufsize, const int1
|
||||||
* Returns number of converted composite samples (total samples divided by number of channels)
|
* Returns number of converted composite samples (total samples divided by number of channels)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
int adpcm_decode_block (int16_t *outbuf, const uint8_t *inbuf, size_t inbufsize, int channels)
|
int adpcm_decode_block (int16_t *outbuf, const uint8_t *inbuf, size_t inbufsize, size_t outbufsize, int channels)
|
||||||
{
|
{
|
||||||
int ch, samples = 1, chunks;
|
int ch, samples = 1, chunks;
|
||||||
int32_t pcmdata[2];
|
int32_t pcmdata[2];
|
||||||
|
|
2
extern/adpcm-xq-s/adpcm-lib.h
vendored
2
extern/adpcm-xq-s/adpcm-lib.h
vendored
|
@ -33,7 +33,7 @@ extern "C" {
|
||||||
|
|
||||||
void *adpcm_create_context (int num_channels, int lookahead, int noise_shaping, int32_t initial_deltas [2]);
|
void *adpcm_create_context (int num_channels, int lookahead, int noise_shaping, int32_t initial_deltas [2]);
|
||||||
int adpcm_encode_block (void *p, uint8_t *outbuf, size_t *outbufsize, const int16_t *inbuf, int inbufcount);
|
int adpcm_encode_block (void *p, uint8_t *outbuf, size_t *outbufsize, const int16_t *inbuf, int inbufcount);
|
||||||
int adpcm_decode_block (int16_t *outbuf, const uint8_t *inbuf, size_t inbufsize, int channels);
|
int adpcm_decode_block (int16_t *outbuf, const uint8_t *inbuf, size_t inbufsize, size_t outbufsize, int channels);
|
||||||
void adpcm_free_context (void *p);
|
void adpcm_free_context (void *p);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
|
|
@ -397,6 +397,9 @@ DivSample* DivEngine::sampleFromFileRaw(const char* path, DivSampleDepth depth,
|
||||||
case DIV_SAMPLE_DEPTH_VOX:
|
case DIV_SAMPLE_DEPTH_VOX:
|
||||||
samples=lenDivided*2;
|
samples=lenDivided*2;
|
||||||
break;
|
break;
|
||||||
|
case DIV_SAMPLE_DEPTH_IMA_ADPCM:
|
||||||
|
samples=(lenDivided-4)*2;
|
||||||
|
break;
|
||||||
case DIV_SAMPLE_DEPTH_8BIT:
|
case DIV_SAMPLE_DEPTH_8BIT:
|
||||||
case DIV_SAMPLE_DEPTH_MULAW:
|
case DIV_SAMPLE_DEPTH_MULAW:
|
||||||
case DIV_SAMPLE_DEPTH_C219:
|
case DIV_SAMPLE_DEPTH_C219:
|
||||||
|
|
|
@ -1289,7 +1289,7 @@ void DivSample::render(unsigned int formatMask) {
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case DIV_SAMPLE_DEPTH_IMA_ADPCM: // IMA ADPCM
|
case DIV_SAMPLE_DEPTH_IMA_ADPCM: // IMA ADPCM
|
||||||
if (adpcm_decode_block(data16,dataIMA,lengthIMA,1)==0) logE("oh crap!");
|
if (adpcm_decode_block(data16,dataIMA,lengthIMA,samples,1)==0) logE("oh crap!");
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in a new issue