Lines Matching refs:hdr
120 uint8_t hdr[] = {
148 hdr[34] = bits16 ? 0x10 : 0x08;
161 le_store (hdr + 22, hw->info.nchannels, 2);
162 le_store (hdr + 24, hw->info.freq, 4);
163 le_store (hdr + 28, hw->info.freq << (bits16 + stereo), 4);
164 le_store (hdr + 32, 1 << (bits16 + stereo), 2);
175 if (fwrite (hdr, sizeof (hdr), 1, wav->f) != 1) {
257 uint8_t hdr[44];
268 if (fread(hdr, sizeof(hdr), 1, wav->f) != 1) {
274 if ( hdr[0] != 'R' || hdr[1] != 'I' || hdr[2] != 'F' || hdr[3] != 'F' ||
275 hdr[8] != 'W' || hdr[9] != 'A' || hdr[10]!= 'V' || hdr[11]!= 'E' ||
276 hdr[12]!= 'f' || hdr[13]!= 'm' || hdr[14]!= 't' || hdr[15]!= ' ' ||
277 hdr[40]!= 'd' || hdr[41]!= 'a' || hdr[42]!= 't' || hdr[43]!= 'a') {
282 nchannels = le_read( hdr+22, 2 );
283 freq = le_read( hdr+24, 4 );
284 format = le_read( hdr+32, 2 );
285 bits = le_read( hdr+34, 2 );
287 wav->total_size = le_read( hdr+40, 4 );