5249 4646 94e5 3703 5741 5645 666d 7420
1000 0000 0100 0200 44ac 0000 10b1 0200
0400 1000 6461 7461 70e5 3703 0000 0000
I have trouble decoding this header. I am trying this by hand according to https://ccrma.stanford.edu/courses/422/projects/WaveFormat/. I would expect some of those hexa's to be like: channels: 2, sampling rate: 44100, audio format: pcm...
What am I doing wrong?
RIFF
ChunkID 4 5249 4646 "RIFF"
ChunkSize 4 94e5 3703 2498049795
Format 4 5741 5645 "WAVE"
FMT
Subchunk1ID 4 666d 7420 "fmt "
Subchunk1Size 4 1000 0000 268435456
AudioFormat 2 0100 256
NumChannels 2 0200 512
SampleRate 4 44ac 0000 1152122880
ByteRate 4 10b1 0200 280035840
BlockAlign 2 0400 1024
BitsPerSample 2 1000 4096
DATA
Subchuk2ID 4 6461 7461 "data"
Subchunk2Size 4 70e5 3703 1894070019
data
You are not taking endian into account. The values are in little endian, but you are interpreting them as big endian instead.
The correct breakdown is as follows:
RIFF
ChunkID 4 52 49 46 46 "RIFF"
ChunkSize 4 94 e5 37 03 53994900
Format 4 57 41 56 45 "WAVE"
FMT
Subchunk1ID 4 66 6d 74 20 "fmt "
Subchunk1Size 4 10 00 00 00 16
AudioFormat 2 01 00 1
NumChannels 2 02 00 2
SampleRate 4 44 ac 00 00 44100
ByteRate 4 10 b1 02 00 176400
BlockAlign 2 04 00 4
BitsPerSample 2 10 00 16
DATA
Subchuk2ID 4 64 61 74 61 "data"
Subchunk2Size 4 70 e5 37 03 53994864
data
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With