Lines Matching refs:audiofd
79 static int audiofd = -1;
181 audiofd = open(device, O_WRONLY);
182 if (audiofd < 0 && device == defdevice) {
184 audiofd = open(device, O_WRONLY);
186 if (audiofd < 0)
189 if (ioctl(audiofd, AUDIO_GETINFO, &info) < 0)
215 if (audiofd != -1) {
216 (void)ioctl(audiofd, AUDIO_FLUSH, NULL);
217 (void)ioctl(audiofd, AUDIO_SETINFO, &info);
218 close(audiofd);
219 audiofd = -1;
365 sizet_filesize, audiofd, &datasize, file, &conv)) < 0) {
383 nw = audio_write(audiofd, addr, bufsize, conv);
391 nw = audio_write(audiofd, addr, datasize, conv);
397 if (!nflag && ioctl(audiofd, AUDIO_DRAIN) < 0 && !qflag)
431 hdrlen = audioctl_write_fromhdr(buffer, nr, audiofd, &datasize, file, &conv);
447 nw = audio_write(audiofd, buffer, nr, conv);
460 if (!nflag && ioctl(audiofd, AUDIO_DRAIN) < 0 && !qflag)