I see no such field in canonical WAV structure, but maybe it possible to use existing fields for that?
I know that we can calc samples count for PCM stream easy (raw_sound_data_size / (bits_pers_sample / 8)
), but what to do with ADPCM?
I see no such field in canonical WAV structure, but maybe it possible to use existing fields for that?
I know that we can calc samples count for PCM stream easy (raw_sound_data_size / (bits_pers_sample / 8)
), but what to do with ADPCM?
Copyright © 2021 Jogjafile Inc.
Generally Subchank2Size is a size of data in bytes. And bitsPerSample how many bits in sample. So the number of samples should be:
Its true for uncompressed data
ADPCM data saved in "blocks". The block has three parts, the header, data, and padding. The three together are <nBlockAlign> bytes.
Header
Data
The data is a bit string parsed in groups of (wBitsPerSample * nChannels).
Padding
Bit Padding is used to round off the block to an exact byte length.
More info about decoding ADPCM format can be found here
Unfortunately it seems there is no way to find exact samples count without enumerate all blocks.