VirtualBox

Changeset 63766 in vbox for trunk/src/VBox/Devices


Ignore:
Timestamp:
Sep 8, 2016 1:45:48 PM (8 years ago)
Author:
vboxsync
Message:

Audio/DrvHostAudioOSS.cpp: Fixed stream access mode, also for FreeBSD (thanks to
Jung-uk Kim).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Audio/DrvHostOSSAudio.cpp

    r63711 r63766  
    312312        }
    313313
     314        /* Check access mode (input or output). */
     315        bool fIn = ((fOpen & O_ACCMODE) == O_RDONLY);
     316
    314317        audio_buf_info abinfo;
    315         if (ioctl(hFile, (fOpen & O_RDONLY) ? SNDCTL_DSP_GETISPACE : SNDCTL_DSP_GETOSPACE, &abinfo))
    316         {
    317             LogRel(("OSS: Failed to retrieve buffer length: %s (%d)\n", strerror(errno), errno));
     318        if (ioctl(hFile, fIn ? SNDCTL_DSP_GETISPACE : SNDCTL_DSP_GETOSPACE, &abinfo))
     319        {
     320            LogRel(("OSS: Failed to retrieve %s buffer length: %s (%d)\n", fIn ? "input" : "output", strerror(errno), errno));
    318321            rc = RTErrConvertFromErrno(errno);
    319322            break;
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette