Changeset 88724 in vbox for trunk/include/VBox
- Timestamp:
- Apr 27, 2021 10:24:18 AM (4 years ago)
- Location:
- trunk/include/VBox/vmm
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/vmm/pdmaudioifs.h
r88723 r88724 899 899 900 900 901 /** @name PDMAUDIOSTREAM STS_FLAGS_XXX901 /** @name PDMAUDIOSTREAM_STS_XXX 902 902 * @{ */ 903 903 /** No flags being set. */ 904 #define PDMAUDIOSTREAM STS_FLAGS_NONEUINT32_C(0)904 #define PDMAUDIOSTREAM_STS_NONE UINT32_C(0) 905 905 /** Whether this stream has been initialized by the backend or not. */ 906 #define PDMAUDIOSTREAM STS_FLAGS_INITIALIZEDRT_BIT_32(0)906 #define PDMAUDIOSTREAM_STS_INITIALIZED RT_BIT_32(0) 907 907 /** Whether this stream is enabled or disabled. */ 908 #define PDMAUDIOSTREAM STS_FLAGS_ENABLEDRT_BIT_32(1)908 #define PDMAUDIOSTREAM_STS_ENABLED RT_BIT_32(1) 909 909 /** Whether this stream has been paused or not. This also implies 910 910 * that this is an enabled stream! */ 911 #define PDMAUDIOSTREAM STS_FLAGS_PAUSEDRT_BIT_32(2)911 #define PDMAUDIOSTREAM_STS_PAUSED RT_BIT_32(2) 912 912 /** Indicates that the stream is draining (output only). 913 913 * Whether this stream was marked as being disabled 914 914 * but there are still associated guest output streams 915 915 * which rely on its data. */ 916 #define PDMAUDIOSTREAM STS_FLAGS_PENDING_DISABLERT_BIT_32(3)916 #define PDMAUDIOSTREAM_STS_PENDING_DISABLE RT_BIT_32(3) 917 917 /** Whether this stream is in re-initialization phase and requires the device 918 918 * to call pfnStreamReInit. … … 920 920 * All other bits remain untouched to be able to restore the stream's state 921 921 * after the re-initialization has been completed. */ 922 #define PDMAUDIOSTREAM STS_FLAGS_NEED_REINITRT_BIT_32(4)922 #define PDMAUDIOSTREAM_STS_NEED_REINIT RT_BIT_32(4) 923 923 /** Validation mask. */ 924 #define PDMAUDIOSTREAM STS_VALID_MASKUINT32_C(0x0000001F)925 /** Stream status flag, PDMAUDIOSTREAM STS_FLAGS_XXX. */926 typedef uint32_t PDMAUDIOSTREAMSTS;924 #define PDMAUDIOSTREAM_STS_VALID_MASK UINT32_C(0x0000001F) 925 /** Stream status flag, PDMAUDIOSTREAM_STS_XXX. */ 926 typedef uint32_t uint32_t; 927 927 /** @} */ 928 928 … … 975 975 uint32_t volatile cRefs; 976 976 /** Stream status flag. */ 977 PDMAUDIOSTREAMSTSfStatus;977 uint32_t fStatus; 978 978 /** Audio direction of this stream. */ 979 979 PDMAUDIODIR enmDir; … … 1092 1092 1093 1093 /** 1094 * Re-initializes the stream in response to PDMAUDIOSTREAM STS_FLAGS_NEED_REINIT.1094 * Re-initializes the stream in response to PDMAUDIOSTREAM_STS_NEED_REINIT. 1095 1095 * 1096 1096 * @returns VBox status code. … … 1162 1162 * @param pStream Pointer to audio stream. 1163 1163 */ 1164 DECLR3CALLBACKMEMBER( PDMAUDIOSTREAMSTS, pfnStreamGetStatus, (PPDMIAUDIOCONNECTOR pInterface, PPDMAUDIOSTREAM pStream));1164 DECLR3CALLBACKMEMBER(uint32_t, pfnStreamGetStatus, (PPDMIAUDIOCONNECTOR pInterface, PPDMAUDIOSTREAM pStream)); 1165 1165 1166 1166 /** … … 1375 1375 * Returns the current status of the given backend stream. 1376 1376 * 1377 * @returns PDMAUDIOSTREAMSTS1377 * @returns uint32_t 1378 1378 * @param pInterface Pointer to the interface structure containing the called function pointer. 1379 1379 * @param pStream Pointer to audio stream. 1380 1380 */ 1381 DECLR3CALLBACKMEMBER( PDMAUDIOSTREAMSTS, pfnStreamGetStatus, (PPDMIHOSTAUDIO pInterface, PPDMAUDIOBACKENDSTREAM pStream));1381 DECLR3CALLBACKMEMBER(uint32_t, pfnStreamGetStatus, (PPDMIHOSTAUDIO pInterface, PPDMAUDIOBACKENDSTREAM pStream)); 1382 1382 1383 1383 /** -
trunk/include/VBox/vmm/pdmaudioinline.h
r88723 r88724 422 422 * 423 423 * @returns @c true if ready to be read from, @c false if not. 424 * @param fStatus Stream status to evaluate, PDMAUDIOSTREAM STS_FLAGS_XXX.425 */ 426 DECLINLINE(bool) PDMAudioStrmStatusCanRead( PDMAUDIOSTREAMSTSfStatus)427 { 428 AssertReturn(fStatus & PDMAUDIOSTREAM STS_VALID_MASK, false);424 * @param fStatus Stream status to evaluate, PDMAUDIOSTREAM_STS_XXX. 425 */ 426 DECLINLINE(bool) PDMAudioStrmStatusCanRead(uint32_t fStatus) 427 { 428 AssertReturn(fStatus & PDMAUDIOSTREAM_STS_VALID_MASK, false); 429 429 /* 430 return fStatus & PDMAUDIOSTREAM STS_FLAGS_INITIALIZED431 && fStatus & PDMAUDIOSTREAM STS_FLAGS_ENABLED432 && !(fStatus & PDMAUDIOSTREAM STS_FLAGS_PAUSED)430 return fStatus & PDMAUDIOSTREAM_STS_INITIALIZED 431 && fStatus & PDMAUDIOSTREAM_STS_ENABLED 432 && !(fStatus & PDMAUDIOSTREAM_STS_PAUSED) 433 433 && !(fStatus & PDMAUDIOSTREAMSTS_FLAGS_PENDING_REINIT);*/ 434 return (fStatus & ( PDMAUDIOSTREAM STS_FLAGS_INITIALIZED435 | PDMAUDIOSTREAM STS_FLAGS_ENABLED436 | PDMAUDIOSTREAM STS_FLAGS_PAUSED437 | PDMAUDIOSTREAM STS_FLAGS_NEED_REINIT ))438 == ( PDMAUDIOSTREAM STS_FLAGS_INITIALIZED439 | PDMAUDIOSTREAM STS_FLAGS_ENABLED);434 return (fStatus & ( PDMAUDIOSTREAM_STS_INITIALIZED 435 | PDMAUDIOSTREAM_STS_ENABLED 436 | PDMAUDIOSTREAM_STS_PAUSED 437 | PDMAUDIOSTREAM_STS_NEED_REINIT )) 438 == ( PDMAUDIOSTREAM_STS_INITIALIZED 439 | PDMAUDIOSTREAM_STS_ENABLED); 440 440 } 441 441 … … 444 444 * 445 445 * @returns @c true if ready to be written to, @c false if not. 446 * @param fStatus Stream status to evaluate, PDMAUDIOSTREAM STS_FLAGS_XXX.447 */ 448 DECLINLINE(bool) PDMAudioStrmStatusCanWrite( PDMAUDIOSTREAMSTSfStatus)449 { 450 AssertReturn(fStatus & PDMAUDIOSTREAM STS_VALID_MASK, false);446 * @param fStatus Stream status to evaluate, PDMAUDIOSTREAM_STS_XXX. 447 */ 448 DECLINLINE(bool) PDMAudioStrmStatusCanWrite(uint32_t fStatus) 449 { 450 AssertReturn(fStatus & PDMAUDIOSTREAM_STS_VALID_MASK, false); 451 451 /* 452 return fStatus & PDMAUDIOSTREAM STS_FLAGS_INITIALIZED453 && fStatus & PDMAUDIOSTREAM STS_FLAGS_ENABLED454 && !(fStatus & PDMAUDIOSTREAM STS_FLAGS_PAUSED)455 && !(fStatus & PDMAUDIOSTREAM STS_FLAGS_PENDING_DISABLE)452 return fStatus & PDMAUDIOSTREAM_STS_INITIALIZED 453 && fStatus & PDMAUDIOSTREAM_STS_ENABLED 454 && !(fStatus & PDMAUDIOSTREAM_STS_PAUSED) 455 && !(fStatus & PDMAUDIOSTREAM_STS_PENDING_DISABLE) 456 456 && !(fStatus & PDMAUDIOSTREAMSTS_FLAGS_PENDING_REINIT);*/ 457 return (fStatus & ( PDMAUDIOSTREAM STS_FLAGS_INITIALIZED458 | PDMAUDIOSTREAM STS_FLAGS_ENABLED459 | PDMAUDIOSTREAM STS_FLAGS_PAUSED460 | PDMAUDIOSTREAM STS_FLAGS_PENDING_DISABLE461 | PDMAUDIOSTREAM STS_FLAGS_NEED_REINIT))462 == ( PDMAUDIOSTREAM STS_FLAGS_INITIALIZED463 | PDMAUDIOSTREAM STS_FLAGS_ENABLED);457 return (fStatus & ( PDMAUDIOSTREAM_STS_INITIALIZED 458 | PDMAUDIOSTREAM_STS_ENABLED 459 | PDMAUDIOSTREAM_STS_PAUSED 460 | PDMAUDIOSTREAM_STS_PENDING_DISABLE 461 | PDMAUDIOSTREAM_STS_NEED_REINIT)) 462 == ( PDMAUDIOSTREAM_STS_INITIALIZED 463 | PDMAUDIOSTREAM_STS_ENABLED); 464 464 } 465 465 … … 468 468 * 469 469 * @returns @c true if ready to operate, @c false if not. 470 * @param fStatus Stream status to evaluate, PDMAUDIOSTREAM STS_FLAGS_XXX.471 */ 472 DECLINLINE(bool) PDMAudioStrmStatusIsReady( PDMAUDIOSTREAMSTSfStatus)473 { 474 AssertReturn(fStatus & PDMAUDIOSTREAM STS_VALID_MASK, false);470 * @param fStatus Stream status to evaluate, PDMAUDIOSTREAM_STS_XXX. 471 */ 472 DECLINLINE(bool) PDMAudioStrmStatusIsReady(uint32_t fStatus) 473 { 474 AssertReturn(fStatus & PDMAUDIOSTREAM_STS_VALID_MASK, false); 475 475 /* 476 return fStatus & PDMAUDIOSTREAM STS_FLAGS_INITIALIZED477 && fStatus & PDMAUDIOSTREAM STS_FLAGS_ENABLED476 return fStatus & PDMAUDIOSTREAM_STS_INITIALIZED 477 && fStatus & PDMAUDIOSTREAM_STS_ENABLED 478 478 && !(fStatus & PDMAUDIOSTREAMSTS_FLAGS_PENDING_REINIT);*/ 479 return (fStatus & ( PDMAUDIOSTREAM STS_FLAGS_INITIALIZED480 | PDMAUDIOSTREAM STS_FLAGS_ENABLED481 | PDMAUDIOSTREAM STS_FLAGS_NEED_REINIT))482 == ( PDMAUDIOSTREAM STS_FLAGS_INITIALIZED483 | PDMAUDIOSTREAM STS_FLAGS_ENABLED);479 return (fStatus & ( PDMAUDIOSTREAM_STS_INITIALIZED 480 | PDMAUDIOSTREAM_STS_ENABLED 481 | PDMAUDIOSTREAM_STS_NEED_REINIT)) 482 == ( PDMAUDIOSTREAM_STS_INITIALIZED 483 | PDMAUDIOSTREAM_STS_ENABLED); 484 484 } 485 485
Note:
See TracChangeset
for help on using the changeset viewer.