Lines Matching defs:wav
82 unsigned char wav[12];
84 actual = fread(wav, sizeof(char), sizeof(wav), stream);
91 if (memcmp(wav, "RIFF", 4)) {
93 fprintf(stderr, "wav != RIFF\n");
97 unsigned riffSize = little4u(&wav[4]);
104 if (memcmp(&wav[8], "WAVE", 4)) {
316 unsigned char wav[58];
317 memset(wav, 0, sizeof(wav));
318 memcpy(wav, "RIFF", 4);
319 memcpy(&wav[8], "WAVEfmt ", 8);
321 wav[4] = 50; // riffSize
322 wav[16] = 18; // fmtSize
323 wav[20] = WAVE_FORMAT_IEEE_FLOAT;
325 wav[4] = 36; // riffSize
326 wav[16] = 16; // fmtSize
327 wav[20] = WAVE_FORMAT_PCM;
329 wav[22] = info->channels;
330 write4u(&wav[24], info->samplerate);
354 write4u(&wav[28], byteRate);
355 wav[32] = blockAlignment;
356 wav[34] = bitsPerSample;
359 memcpy(&wav[38], "fact", 4);
360 wav[42] = 4;
361 memcpy(&wav[50], "data", 4);
364 memcpy(&wav[36], "data", 4);
366 (void) fwrite(wav, 44 + extra, 1, stream);
406 unsigned char wav[58];
408 (void) fread(wav, 44 + extra, 1, handle->stream);
410 write4u(&wav[4], dataSize + 36 + extra); // riffSize
411 write4u(&wav[40 + extra], dataSize); // dataSize
413 (void) fwrite(wav, 44 + extra, 1, handle->stream);