static int verbose = 0;
static int vumeter = VUMETER_NONE;
static int buffer_pos = 0;
-static size_t bits_per_sample, bits_per_frame;
+static size_t significant_bits_per_sample, bits_per_sample, bits_per_frame;
static size_t chunk_bytes;
static int test_position = 0;
static int test_coef = 8;
snd_pcm_dump(handle, log);
bits_per_sample = snd_pcm_format_physical_width(hwparams.format);
+ significant_bits_per_sample = snd_pcm_format_width(hwparams.format);
bits_per_frame = bits_per_sample * hwparams.channels;
chunk_bytes = chunk_size * bits_per_frame / 8;
audiobuf = realloc(audiobuf, chunk_bytes);
}
return;
}
- max = 1 << (bits_per_sample-1);
+ max = 1 << (significant_bits_per_sample-1);
if (max <= 0)
max = 0x7fffffff;