Lines Matching defs:block
77 // Data block for terminator type has an exceptional format.
179 // - Appear just before v110_data block.
360 struct block_v120_format *block)
362 state->frames_per_second = le32toh(block->frames_per_second);
363 state->bytes_per_sample = block->bits_per_sample / 8;
364 state->samples_per_frame = block->samples_per_frame;
365 state->code_id = le16toh(block->code_id);
366 state->byte_count = parse_block_data_size(block->size) - 12;
375 struct block_extended_v110_format *block)
381 state->code_id = block->code_id;
385 if (block->ch_mode == 0)
387 else if (block->ch_mode == 1)
392 time_const = le16toh(block->time_const);
405 struct block_v110_data *block)
412 state->code_id = block->code_id;
416 time_const = block->time_const;
426 state->byte_count = parse_block_data_size(block->size) - 2;
495 // Check type of this block.
508 // Check size of this block. If the block includes a batch of data,
585 // This program handles PCM frames in this data block only.
615 struct block_v120_format *block,
621 block->type = BLOCK_TYPE_V120_DATA;
622 build_block_data_size(block->size, 12 + byte_count);
624 block->frames_per_second = htole32(frames_per_second);
625 block->bits_per_sample = state->bytes_per_sample * 8;
626 block->samples_per_frame = state->samples_per_frame;
627 block->code_id = htole16(state->code_id);
629 return container_recursive_write(cntr, block, sizeof(*block));
634 struct block_extended_v110_format *block)
640 block->type = BLOCK_TYPE_EXTENDED_V110_FORMAT;
641 build_block_data_size(block->size, 4);
648 block->time_const = htole16(time_const);
649 block->code_id = htole16(state->code_id);
652 block->ch_mode = 0;
654 block->ch_mode = 1;
656 return container_recursive_write(cntr, block, sizeof(*block));
660 struct block_v110_data *block,
668 block->type = BLOCK_TYPE_V110_DATA;
669 build_block_data_size(block->size, 2 + byte_count);
675 block->time_const = (uint8_t)time_const;
676 block->code_id = state->code_id;
677 return container_recursive_write(cntr, block, sizeof(*block));
769 struct block_terminator block = {0};
771 block.type = BLOCK_TYPE_TERMINATOR;
772 return container_recursive_write(cntr, &block, sizeof(block));