ref: cef9d9ade1eb912a427ddaecaa166956657c98d2
parent: 72f919fa95f525abdc80f7b32ef7bb308ae6f4d7
author: rrt <rrt>
date: Thu Nov 1 16:36:40 EDT 2007
Set (bogus) size for ADPCM formats, same as SoX does natively: now we can play vox files with libsndfile! Return correct SoX encoding for OKI ADPCM.
--- a/src/sndfile.c
+++ b/src/sndfile.c
@@ -77,13 +77,17 @@
*size = SOX_SIZE_8BIT;
return SOX_ENCODING_ALAW;
case SF_FORMAT_IMA_ADPCM:
+ *size = SOX_SIZE_16BIT;
return SOX_ENCODING_IMA_ADPCM;
case SF_FORMAT_MS_ADPCM:
+ *size = SOX_SIZE_16BIT;
return SOX_ENCODING_MS_ADPCM;
case SF_FORMAT_GSM610:
+ *size = SOX_SIZE_16BIT;
return SOX_ENCODING_GSM;
case SF_FORMAT_VOX_ADPCM:
- return SOX_ENCODING_ADPCM;
+ *size = SOX_SIZE_16BIT;
+ return SOX_ENCODING_OKI_ADPCM;
/* For encodings we can't represent, have a sensible default */
case SF_FORMAT_G721_32: