don't block if the sound device is busy (from Grievre)

This commit is contained in:
Bill Currie 2004-01-16 02:50:26 +00:00
parent 710a6c9e2d
commit 17db1f42f2
1 changed files with 1 additions and 0 deletions

View File

@ -137,6 +137,7 @@ try_open (int rw)
mmmode |= PROT_READ;
mmflags |= MAP_SHARED;
}
omode |= O_NONBLOCK;
audio_fd = open (snd_dev, omode);
if (audio_fd < 0) { // Failed open, retry up to 3 times