Patterns for .zip files and .wav files (#12)

* create .wav file pattern

* create .zip file pattern

* update readme with wav and zip

* update some names in wav pattern
This commit is contained in:
Quentin Fan-Chiang
2021-03-30 14:55:52 -04:00
committed by GitHub
parent 92d0abc57d
commit 0488b98b88
3 changed files with 75 additions and 0 deletions

29
patterns/wav.hexpat Normal file
View File

@@ -0,0 +1,29 @@
#pragma MIME audio/wav
struct riffHeader{
char ckID[4] [[comment("Container Signature"), name("RIFF Header Signature")]];
u32 ckSize [[comment("Size of RIFF Header"), name("RIFF Chunk Size")]];
};
struct waveHeader{
char format[4] [[name("WAVE Header Signature")]];
char ckID[4] [[comment("Format Chunk")]];
u32 ckSize [[comment("Chunk size")]];
u16 wFormatTag;
u16 wChannels;
u32 dwSamplesPerSec [[comment("Sample Frequency")]];
u32 dwAvgBytesPerSec [[comment("BPS - Used to estimate buffer size")]];
u16 wBlockAlign;
};
struct pcmHeader{
u16 wBitsPerSample;
};
struct wavHeader{
riffHeader riff;
waveHeader wave;
pcmHeader pcm;
};
wavHeader header @0x00;