Audio

 view release on metacpan or  search on metacpan

Play/config/sun.xs  view on Meta::CPAN


audio_open(play_audio_t *dev, int Wait)
{
 /* Try it quickly, first */
 Zero(dev, 1, play_audio_t);
 dev->fd = open(dev_file, O_WRONLY | O_NDELAY);
 if ((dev->fd < 0) && (errno == EBUSY))
  {
   if (!Wait)
    {
     croak("%s is busy\n", dev_file);
    }
   /* Now hang until it's open */
   dev->fd = open(dev_file, O_WRONLY);
  }
 else if (dev->fd >= 0)
  {
   int flags = fcntl(dev->fd, F_GETFL, NULL);
   if (flags >= 0)
    fcntl(dev->fd, F_SETFL, flags & ~O_NDELAY);
   else



( run in 0.564 second using v1.01-cache-2.11-cpan-87723dcf8b7 )