david-pace / wave-recovery-tool

Tool to display WAVE/AIFF file header information and to restore corrupted WAVE/AIFF file headers
GNU General Public License v3.0
14 stars 2 forks source link

Provide Support to Detect Bit Depth and Number of Channels #10

Open david-pace opened 2 years ago

david-pace commented 2 years ago

In general it is not possible to tell the bit depth and the number of channels by analyzing the audio bytes. However, under certain conditions it is possible to exclude some combinations of bit depth and number of channels.

Assuming all audio bytes are still present, the following assumptions can be made:

The problem is that some of those cases apply at the same time, e.g. if the number is divisible by 6 it is also divisible by 3 and 2. Worst case would be multiples of 12, for which all possibilities would apply.