MediaArea / BWFMetaEdit

WAV/BWF metadata editor
https://MediaArea.net/BWFMetaEdit
Other
50 stars 19 forks source link

add test that data chunk length is aligned to sample length * channel count #166

Closed dericed closed 4 years ago

dericed commented 4 years ago

Example file:

52 49 46 46 46 00 00 00 57 41 56 45 66 6D 74 20 28 00 00 00 FE FF 02 00 80 3E 00 00 00 77 01 00 06 00 18 00 16 00 18 00 03 00 00 00 01 00 00 00 00 00 10 00 80 00 00 AA 00 38 9B 71 64 61 74 61 0A 00 00 00 C6 5D 00 C6 5D 00 D9 E1 01 D9

data_length_not_sample_aligned.wav.zip

The audio is 2 channels and each audio sample is 24 bits (3 bytes). Thus the data chunk should be aligned increments of 6 bytes (2 channels * 3 bytes per sample). I made this example to use a data chunk of 10 bytes in size. BWF MetaEdit reports no error, though the file doesn't make sense.

I suggest a message like: "The audio is X channels and Y bytes/sample; however, the data chunk is not aligned to a multiple of Z (X*Y)." Welcoming better suggestions for the message. I'm not sure if there is a term for the data that is the total of each channel's samples for a giving point in time.

dericed commented 4 years ago

Ooops, this is a duplicate of https://github.com/MediaArea/BWFMetaEdit/issues/156.