Changeset 89468 in vbox
- Timestamp:
- Jun 2, 2021 1:18:28 PM (3 years ago)
- Location:
- trunk/src/VBox/Devices/Audio
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Audio/AudioTest.cpp
r89465 r89468 593 593 594 594 /** 595 * Retrieves the temporary directory. 596 * 597 * @returns VBox status code. 598 * @param pszPath Where to return the absolute path of the created directory on success. 599 * @param cbPath Size (in bytes) of \a pszPath. 600 */ 601 int AudioTestPathGetTemp(char *pszPath, size_t cbPath) 602 { 603 int rc = RTEnvGetEx(RTENV_DEFAULT, "TESTBOX_PATH_SCRATCH", pszPath, cbPath, NULL); 604 if (RT_FAILURE(rc)) 605 { 606 rc = RTPathTemp(pszPath, cbPath); 607 AssertRCReturn(rc, rc); 608 } 609 610 return rc; 611 } 612 613 /** 595 614 * Creates a new temporary directory with a specific (test) tag. 596 615 * … … 608 627 609 628 char szTemp[RTPATH_MAX]; 610 int rc = RTEnvGetEx(RTENV_DEFAULT, "TESTBOX_PATH_SCRATCH", szTemp, sizeof(szTemp), NULL); 611 if (RT_FAILURE(rc)) 612 { 613 rc = RTPathTemp(szTemp, sizeof(szTemp)); 614 AssertRCReturn(rc, rc); 615 } 629 int rc = AudioTestPathGetTemp(szTemp, sizeof(szTemp)); 630 AssertRCReturn(rc, rc); 616 631 617 632 rc = AudioTestPathCreate(szTemp, sizeof(szTemp), pszTag); -
trunk/src/VBox/Devices/Audio/AudioTest.h
r89465 r89468 342 342 int AudioTestToneParamsInitRandom(PAUDIOTESTTONEPARMS pToneParams, PPDMAUDIOPCMPROPS pProps); 343 343 344 int AudioTestPathGetTemp(char *pszPath, size_t cbPath); 344 345 int AudioTestPathCreateTemp(char *pszPath, size_t cbPath, const char *pszUUID); 345 346 int AudioTestPathCreate(char *pszPath, size_t cbPath, const char *pszUUID);
Note:
See TracChangeset
for help on using the changeset viewer.