Skip to content

Commit

Permalink
Remove WAV writer support for container shifts.
Browse files Browse the repository at this point in the history
Unused since 8219a31.
  • Loading branch information
foo86 committed Jun 2, 2015
1 parent 1674472 commit 8499504
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions libdcadec/dca_waveout.c
Expand Up @@ -38,7 +38,6 @@ struct dcadec_waveout {
int sample_rate;
int bits_per_sample;
int bytes_per_sample;
int container_shift;
int block_align;
};

Expand Down Expand Up @@ -146,7 +145,6 @@ static int write_data(struct dcadec_waveout *wave, FILE *fp,
{
int limit = 1 << (wave->bits_per_sample - 1);
int mask = ~((1 << wave->bits_per_sample) - 1);
int shift = wave->container_shift;
int bps = wave->bytes_per_sample;
int nclipped = 0;

Expand All @@ -160,8 +158,6 @@ static int write_data(struct dcadec_waveout *wave, FILE *fp,
nclipped++;
}

sample <<= shift;

switch (bps) {
case 4:
dst[0] = (sample >> 0) & 0xff;
Expand Down Expand Up @@ -225,7 +221,6 @@ DCADEC_API int dcadec_waveout_write(struct dcadec_waveout *wave, int **samples,
wave->sample_rate = sample_rate;
wave->bits_per_sample = bits_per_sample;
wave->bytes_per_sample = (bits_per_sample + 7) >> 3;
wave->container_shift = (wave->bytes_per_sample << 3) - bits_per_sample;

if (wave->flags & DCADEC_WAVEOUT_FLAG_MONO) {
wave->block_align = wave->bytes_per_sample;
Expand Down

0 comments on commit 8499504

Please sign in to comment.