Home | History | Annotate | Download | only in sound

Lines Matching refs:fn

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