#include #include #include int main(void) { int n = 44; char buf[n]; int i=0; while (i < n) { i += read(0, buf+i, n-i); } if (strncmp(buf, "RIFF", 4) || strncmp(buf+36, "data", 4)) { fprintf(stderr, "whoops, that's not a .wav file!\n"); exit(1); } buf[4] = 0xF7; buf[5] = 0xFF; buf[6] = 0xFF; buf[7] = 0x7F; buf[40] = 0xd3; buf[41] = 0xFF; buf[42] = 0xFF; buf[43] = 0x7F; write(1, buf, n); execlp("cat", "cat", 0); perror("ohno can't exec cat"); exit(1); }