Skip to content

Commit

Permalink
Use 16-bit sample buffer when reading .pcm files in libSoX. Fixes .pc…
Browse files Browse the repository at this point in the history
…m input files.
  • Loading branch information
qwertymodo committed Jun 24, 2017
1 parent ff487a5 commit 0d8b817
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions 3rdparty/sox/src/msupcm-fmt.c
Original file line number Diff line number Diff line change
Expand Up @@ -95,10 +95,10 @@ static size_t read_samples(sox_format_t * ft, sox_sample_t *buf, size_t len)
{
priv_t * UNUSED msu = (priv_t *)ft->priv;
size_t done;
unsigned char sample;
uint16_t sample;

for (done = 0; done < len; done++) {
if (lsx_eof(ft) || lsx_readb(ft, &sample)) /* no more samples */
if (lsx_eof(ft) || lsx_readw(ft, &sample)) /* no more samples */
break;
switch (ft->encoding.bits_per_sample) {
case 16:
Expand Down

0 comments on commit 0d8b817

Please sign in to comment.