- Timestamp:
- Aug 1, 2018 2:47:53 PM (6 years ago)
- Location:
- trunk/src/VBox/Devices/Audio
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Audio/DrvAudio.h
r73423 r73429 220 220 /** @name Audio stream helper methods. 221 221 * @{ */ 222 bool DrvAudioHlpStreamStatusCanRead(PDMAUDIOSTREAMSTS enmStatus); 223 bool DrvAudioHlpStreamStatusCanWrite(PDMAUDIOSTREAMSTS enmStatus); 222 224 bool DrvAudioHlpStreamStatusIsReady(PDMAUDIOSTREAMSTS enmStatus); 223 225 /** @} */ -
trunk/src/VBox/Devices/Audio/DrvAudioCommon.cpp
r73423 r73429 1033 1033 1034 1034 /** 1035 * Returns @c true if the given stream status indicates a ready-to-operatestream,1035 * Returns @c true if the given stream status indicates a can-be-read-from stream, 1036 1036 * @c false if not. 1037 1037 * 1038 * @returns @c true if ready to operate, @c if not.1038 * @returns @c true if ready to be read from, @c if not. 1039 1039 * @param enmStatus Stream status to evaluate. 1040 1040 */ 1041 bool DrvAudioHlpStreamStatusIsReady(PDMAUDIOSTREAMSTS enmStatus) 1041 bool DrvAudioHlpStreamStatusCanRead(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_REINIT); 1049 } 1050 1051 /** 1052 * Returns @c true if the given stream status indicates a can-be-written-to stream, 1053 * @c false if not. 1054 * 1055 * @returns @c true if ready to be written to, @c if not. 1056 * @param enmStatus Stream status to evaluate. 1057 */ 1058 bool DrvAudioHlpStreamStatusCanWrite(PDMAUDIOSTREAMSTS enmStatus) 1042 1059 { 1043 1060 AssertReturn(enmStatus & PDMAUDIOSTREAMSTS_VALID_MASK, false); … … 1047 1064 && !(enmStatus & PDMAUDIOSTREAMSTS_FLAG_PAUSED) 1048 1065 && !(enmStatus & PDMAUDIOSTREAMSTS_FLAG_PENDING_DISABLE) 1066 && !(enmStatus & PDMAUDIOSTREAMSTS_FLAG_PENDING_REINIT); 1067 } 1068 1069 /** 1070 * Returns @c true if the given stream status indicates a ready-to-operate stream, 1071 * @c false if not. 1072 * 1073 * @returns @c true if ready to operate, @c if not. 1074 * @param enmStatus Stream status to evaluate. 1075 */ 1076 bool DrvAudioHlpStreamStatusIsReady(PDMAUDIOSTREAMSTS enmStatus) 1077 { 1078 AssertReturn(enmStatus & PDMAUDIOSTREAMSTS_VALID_MASK, false); 1079 1080 return enmStatus & PDMAUDIOSTREAMSTS_FLAG_INITIALIZED 1081 && enmStatus & PDMAUDIOSTREAMSTS_FLAG_ENABLED 1049 1082 && !(enmStatus & PDMAUDIOSTREAMSTS_FLAG_PENDING_REINIT); 1050 1083 }
Note:
See TracChangeset
for help on using the changeset viewer.