VirtualBox

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


Ignore:
Timestamp:
Aug 1, 2018 1:53:18 PM (6 years ago)
Author:
vboxsync
Message:

Audio/Common: Added DrvAudioHlpStreamStatusIsReady().

Location:
trunk/src/VBox/Devices/Audio
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Audio/DrvAudio.h

    r73420 r73423  
    218218/** @}  */
    219219
     220/** @name Audio stream helper methods.
     221 * @{ */
     222bool DrvAudioHlpStreamStatusIsReady(PDMAUDIOSTREAMSTS enmStatus);
     223/** @}  */
     224
    220225/** @name Audio file (name) helper methods.
    221226 * @{ */
  • trunk/src/VBox/Devices/Audio/DrvAudioCommon.cpp

    r73420 r73423  
    10301030    AssertMsgFailed(("Invalid stream command %ld\n", enmCmd));
    10311031    return "Unknown";
     1032}
     1033
     1034/**
     1035 * Returns @c true if the given stream status indicates a ready-to-operate stream,
     1036 * @c false if not.
     1037 *
     1038 * @returns @c true if ready to operate, @c if not.
     1039 * @param   enmStatus           Stream status to evaluate.
     1040 */
     1041bool DrvAudioHlpStreamStatusIsReady(PDMAUDIOSTREAMSTS enmStatus)
     1042{
     1043    AssertReturn(enmStatus & PDMAUDIOSTREAMSTS_VALID_MASK, false);
     1044
     1045    return      enmStatus & PDMAUDIOSTREAMSTS_FLAG_INITIALIZED
     1046           &&   enmStatus & PDMAUDIOSTREAMSTS_FLAG_ENABLED
     1047           && !(enmStatus & PDMAUDIOSTREAMSTS_FLAG_PAUSED)
     1048           && !(enmStatus & PDMAUDIOSTREAMSTS_FLAG_PENDING_DISABLE)
     1049           && !(enmStatus & PDMAUDIOSTREAMSTS_FLAG_PENDING_REINIT);
    10321050}
    10331051
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