Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- struct muaHeader {
- union { //0x00
- //this string is big endian, of course (WARNING: NOT NULL TERMINATED)
- //"MUAL" means little endian byte order; "MUAB" means big endian
- char magicNumber_s[4];
- //"MUAL"=0x4D55414C, "MUAB"=0x4D554142 (big endian)
- //"MUAL"=0x4C41554D, "MUAB"=0x4241554D (little endian)
- uint32_t magicNumber;
- };
- //0=pulse code modulation; NO extended header
- //1=delta modulation; extended header
- uint8_t format; //0x04
- uint8_t bitsPerSample;//0x05 bit 7='is signed?'; bits 6->0=bits per sample-1
- //(0 means samples are floats)
- uint16_t numChannels; //0x06 1=mono, 2=stereo, etc.
- uint64_t dataSize; //0x08 in bytes, excluding header
- uint64_t numSamples; //0x10 dataSize / (numChannels*bitsPerSample/8)
- uint32_t sampleRate; //0x18 in hertz
- uint32_t loopCount; //0x1C 'play how many times'; 0=infinite loop
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement