File: 16to8.c

package info (click to toggle)
unmo3 0.6-2
  • links: PTS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 320 kB
  • sloc: ansic: 1,013; makefile: 35; sh: 31
file content (20 lines) | stat: -rw-r--r-- 253 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20

/* convert RAW 16bits samples into 8 bits */

#include<stdio.h>

int main(int argc, char *argv[])
{
  unsigned char c;
  
  fgetc(stdin);
  c = fgetc(stdin);
  while(!feof(stdin)) {
    putchar(c);

    fgetc(stdin);
    c = fgetc(stdin);
	}    
  

}