Lines Matching refs:fn
151 int wav_play(const char *fn) in wav_play() argument
156 fd = open(fn, O_RDONLY); in wav_play()
158 fprintf(stderr, "playwav: cannot open '%s'\n", fn); in wav_play()
172 fprintf(stderr, "playwav: '%s' is not a riff/wave file\n", fn); in wav_play()
177 fprintf(stderr, "playwav: '%s' is not pcm format\n", fn); in wav_play()
181 fprintf(stderr, "playwav: '%s' is not 16bit per sample\n", fn); in wav_play()
191 int wav_rec(const char *fn, unsigned channels, unsigned rate) in wav_rec() argument
215 fd = open(fn, O_CREAT | O_RDWR, 0666); in wav_rec()
291 unlink(fn); in wav_rec()
295 int mp3_play(const char *fn) in mp3_play() argument
301 fd = open(fn, O_RDONLY); in mp3_play()
331 const char *fn = 0; in main() local
356 fn = argv[0]; in main()
362 if (fn == 0) { in main()
363 fn = play ? "/data/out.wav" : "/data/rec.wav"; in main()
367 const char *dot = strrchr(fn, '.'); in main()
369 return mp3_play(fn); in main()
371 return wav_play(fn); in main()
374 return wav_rec(fn, channels, rate); in main()