Lines Matching defs:wav
77 unsigned char wav[12];
79 actual = fread(wav, sizeof(char), sizeof(wav), stream);
84 if (memcmp(wav, "RIFF", 4)) {
85 fprintf(stderr, "wav != RIFF\n");
88 unsigned riffSize = little4u(&wav[4]);
93 if (memcmp(&wav[8], "WAVE", 4)) {
254 unsigned char wav[58];
255 memset(wav, 0, sizeof(wav));
256 memcpy(wav, "RIFF", 4);
257 memcpy(&wav[8], "WAVEfmt ", 8);
259 wav[4] = 50; // riffSize
260 wav[16] = 18; // fmtSize
261 wav[20] = WAVE_FORMAT_IEEE_FLOAT;
263 wav[4] = 36; // riffSize
264 wav[16] = 16; // fmtSize
265 wav[20] = WAVE_FORMAT_PCM;
267 wav[22] = info->channels;
268 write4u(&wav[24], info->samplerate);
286 write4u(&wav[28], byteRate);
287 wav[32] = blockAlignment;
288 wav[34] = bitsPerSample;
290 memcpy(&wav[38], "fact", 4);
291 wav[42] = 4;
292 memcpy(&wav[50], "data", 4);
294 memcpy(&wav[36], "data", 4);
296 (void) fwrite(wav, sizeof(wav), 1, stream);
332 unsigned char wav[58];
334 (void) fread(wav, 44 + extra, 1, handle->stream);
336 write4u(&wav[4], dataSize + 36 + extra); // riffSize
337 write4u(&wav[40 + extra], dataSize); // dataSize
339 (void) fwrite(wav, 44 + extra, 1, handle->stream);