Add a little diagnostic to the output of the alac decoder.
This commit is contained in:
@@ -810,7 +810,7 @@ void alac_decode_frame(alac_file *alac,
|
||||
}
|
||||
else
|
||||
{
|
||||
fprintf(stderr, "FIXME: unhandled predicition type: %i\n", prediction_type);
|
||||
fprintf(stderr, "FIXME: unhandled prediction type for compressed case: %i\n", prediction_type);
|
||||
/* i think the only other prediction type (or perhaps this is just a
|
||||
* boolean?) runs adaptive fir twice.. like:
|
||||
* predictor_decompress_fir_adapt(predictor_error, tempout, ...)
|
||||
@@ -1010,7 +1010,7 @@ void alac_decode_frame(alac_file *alac,
|
||||
}
|
||||
else
|
||||
{ /* see mono case */
|
||||
fprintf(stderr, "FIXME: unhandled predicition type: %i\n", prediction_type_a);
|
||||
fprintf(stderr, "FIXME: unhandled prediction type on channel 1: %i\n", prediction_type_a);
|
||||
}
|
||||
|
||||
/* channel 2 */
|
||||
@@ -1035,7 +1035,7 @@ void alac_decode_frame(alac_file *alac,
|
||||
}
|
||||
else
|
||||
{
|
||||
fprintf(stderr, "FIXME: unhandled predicition type: %i\n", prediction_type_b);
|
||||
fprintf(stderr, "FIXME: unhandled prediction type on channel 2: %i\n", prediction_type_b);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
@@ -242,7 +242,13 @@ static void alac_decode(short *dest, uint8_t *buf, int len) {
|
||||
} else {
|
||||
alac_decode_frame(decoder_info, buf, dest, &outsize);
|
||||
}
|
||||
|
||||
if (outsize!=FRAME_BYTES(frame_size)) {
|
||||
if(outsize<FRAME_BYTES(frame_size)) {
|
||||
debug(1,"Output from alac_decode is smaller than expected. Encrypted = %d.",encrypted);
|
||||
} else {
|
||||
debug(1,"OUtput from alac_decode larger than expected -- truncated, but buffer overflow possible! Encrypted = %d.",encrypted);
|
||||
}
|
||||
}
|
||||
assert(outsize == FRAME_BYTES(frame_size));
|
||||
}
|
||||
|
||||
@@ -786,14 +792,14 @@ static int stuff_buffer_basic(short *inptr, short *outptr, int stuff) {
|
||||
};
|
||||
if (stuff) {
|
||||
if (stuff == 1) {
|
||||
debug(3, "+++++++++");
|
||||
// debug(3, "+++++++++");
|
||||
// interpolate one sample
|
||||
//*outptr++ = dithered_vol(((long)inptr[-2] + (long)inptr[0]) >> 1);
|
||||
//*outptr++ = dithered_vol(((long)inptr[-1] + (long)inptr[1]) >> 1);
|
||||
*outptr++ = dithered_vol(shortmean(inptr[-2], inptr[0]));
|
||||
*outptr++ = dithered_vol(shortmean(inptr[-1], inptr[1]));
|
||||
} else if (stuff == -1) {
|
||||
debug(3, "---------");
|
||||
// debug(3, "---------");
|
||||
inptr++;
|
||||
inptr++;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user