int frame_len_bits;
/** Number of block sizes, one if !ahi->use_variable_block_len. */
int nb_block_sizes;
- /* block info */
- int reset_block_lengths;
+ /* Whether to update block lengths from getbit context. */
+ bool reset_block_lengths;
/** log2 of current block length. */
int block_len_bits;
/** log2 of next block length. */
pwd->windows[i] = sine_windows[pwd->frame_len_bits - i - 7];
}
- pwd->reset_block_lengths = 1;
+ pwd->reset_block_lengths = true;
if (pwd->use_noise_coding) {
/* init the noise generator */
n = wma_log2(pwd->nb_block_sizes - 1) + 1;
if (pwd->reset_block_lengths) {
- pwd->reset_block_lengths = 0;
+ pwd->reset_block_lengths = false;
v = get_bits(&pwd->gb, n);
if (v >= pwd->nb_block_sizes)
return -E_WMA_BLOCK_SIZE;
if (len > 0)
skip_bits(&pwd->gb, len);
- pwd->reset_block_lengths = 1;
+ pwd->reset_block_lengths = true;
for (i = 0; i < nb_frames; i++) {
ret = wma_decode_frame(pwd, samples);
if (ret < 0)