Changeset 88357 in vbox
- Timestamp:
- Apr 4, 2021 10:58:35 PM (4 years ago)
- Location:
- trunk
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/vmm/pdmaudioifs.h
r88356 r88357 905 905 906 906 907 /** @name PDMAUDIOFILE_FLAGS_XXX908 * @{ */909 /** No flags defined. */910 #define PDMAUDIOFILE_FLAGS_NONE UINT32_C(0)911 /** Keep the audio file even if it contains no audio data. */912 #define PDMAUDIOFILE_FLAGS_KEEP_IF_EMPTY RT_BIT_32(0)913 /** Audio file flag validation mask. */914 #define PDMAUDIOFILE_FLAGS_VALID_MASK UINT32_C(0x1)915 /** @} */916 917 /** Audio file default open flags.918 * @todo r=bird: What is the exact purpose of this? */919 #define PDMAUDIOFILE_DEFAULT_OPEN_FLAGS (RTFILE_O_OPEN_CREATE | RTFILE_O_APPEND | RTFILE_O_WRITE | RTFILE_O_DENY_WRITE)920 921 /**922 * Audio file types.923 * @todo r=bird: This does not really belong here.924 */925 typedef enum PDMAUDIOFILETYPE926 {927 /** The customary invalid zero value. */928 PDMAUDIOFILETYPE_INVALID = 0,929 /** Unknown type, do not use. */930 PDMAUDIOFILETYPE_UNKNOWN,931 /** Raw (PCM) file. */932 PDMAUDIOFILETYPE_RAW,933 /** Wave (.WAV) file. */934 PDMAUDIOFILETYPE_WAV,935 /** Hack to blow the type up to 32-bit. */936 PDMAUDIOFILETYPE_32BIT_HACK = 0x7fffffff937 } PDMAUDIOFILETYPE;938 939 /** @name PDMAUDIOFILENAME_FLAGS_XXX940 * @{ */941 /** No flags defined. */942 #define PDMAUDIOFILENAME_FLAGS_NONE UINT32_C(0)943 /** Adds an ISO timestamp to the file name. */944 #define PDMAUDIOFILENAME_FLAGS_TS RT_BIT(0)945 /** @} */946 947 /**948 * Audio file handle.949 */950 typedef struct PDMAUDIOFILE951 {952 /** Type of the audio file. */953 PDMAUDIOFILETYPE enmType;954 /** Audio file flags, PDMAUDIOFILE_FLAGS_XXX. */955 uint32_t fFlags;956 /** Actual file handle. */957 RTFILE hFile;958 /** Data needed for the specific audio file type implemented.959 * Optional, can be NULL. */960 void *pvData;961 /** Data size (in bytes). */962 size_t cbData;963 /** File name and path. */964 char szName[RTPATH_MAX];965 } PDMAUDIOFILE;966 /** Pointer to an audio file handle. */967 typedef PDMAUDIOFILE *PPDMAUDIOFILE;968 969 907 /** @name PDMAUDIOSTREAMSTS_FLAGS_XXX 970 908 * @{ */ -
trunk/src/VBox/Devices/Audio/AudioHlp.cpp
r88300 r88357 321 321 * @param uInstance Device / driver instance which is using this file. 322 322 * @param enmType Audio file type to construct file name for. 323 * @param fFlags File naming flags, PDMAUDIOFILENAME_FLAGS_XXX.323 * @param fFlags File naming flags, AUDIOHLPFILENAME_FLAGS_XXX. 324 324 */ 325 325 int AudioHlpFileNameGet(char *pszFile, size_t cchFile, const char *pszPath, const char *pszName, 326 uint32_t uInstance, PDMAUDIOFILETYPE enmType, uint32_t fFlags)326 uint32_t uInstance, AUDIOHLPFILETYPE enmType, uint32_t fFlags) 327 327 { 328 328 AssertPtrReturn(pszFile, VERR_INVALID_POINTER); … … 370 370 szFileName[0] = '\0'; 371 371 372 if (fFlags & PDMAUDIOFILENAME_FLAGS_TS)372 if (fFlags & AUDIOHLPFILENAME_FLAGS_TS) 373 373 { 374 374 RTTIMESPEC time; … … 404 404 switch (enmType) 405 405 { 406 case PDMAUDIOFILETYPE_RAW:406 case AUDIOHLPFILETYPE_RAW: 407 407 rc = RTStrCat(szFileName, sizeof(szFileName), ".pcm"); 408 408 break; 409 409 410 case PDMAUDIOFILETYPE_WAV:410 case AUDIOHLPFILETYPE_WAV: 411 411 rc = RTStrCat(szFileName, sizeof(szFileName), ".wav"); 412 412 break; … … 440 440 * @param enmType Audio file type to open / create. 441 441 * @param pszFile File path of file to open or create. 442 * @param fFlags Audio file flags, PDMAUDIOFILE_FLAGS_XXX.442 * @param fFlags Audio file flags, AUDIOHLPFILE_FLAGS_XXX. 443 443 * @param ppFile Where to store the created audio file handle. 444 444 * Needs to be destroyed with AudioHlpFileDestroy(). 445 445 */ 446 int AudioHlpFileCreate( PDMAUDIOFILETYPE enmType, const char *pszFile, uint32_t fFlags, PPDMAUDIOFILE *ppFile)446 int AudioHlpFileCreate(AUDIOHLPFILETYPE enmType, const char *pszFile, uint32_t fFlags, PAUDIOHLPFILE *ppFile) 447 447 { 448 448 AssertPtrReturn(pszFile, VERR_INVALID_POINTER); 449 449 /** @todo Validate fFlags. */ 450 450 451 P PDMAUDIOFILE pFile = (PPDMAUDIOFILE)RTMemAlloc(sizeof(PDMAUDIOFILE));451 PAUDIOHLPFILE pFile = (PAUDIOHLPFILE)RTMemAlloc(sizeof(AUDIOHLPFILE)); 452 452 if (!pFile) 453 453 return VERR_NO_MEMORY; … … 457 457 switch (enmType) 458 458 { 459 case PDMAUDIOFILETYPE_RAW:460 case PDMAUDIOFILETYPE_WAV:459 case AUDIOHLPFILETYPE_RAW: 460 case AUDIOHLPFILETYPE_WAV: 461 461 pFile->enmType = enmType; 462 462 break; … … 492 492 * @param pFile Audio file (object) to destroy. 493 493 */ 494 void AudioHlpFileDestroy(P PDMAUDIOFILE pFile)494 void AudioHlpFileDestroy(PAUDIOHLPFILE pFile) 495 495 { 496 496 if (!pFile) … … 509 509 * @param pFile Pointer to audio file handle to use. 510 510 * @param fOpen Open flags. 511 * Use PDMAUDIOFILE_DEFAULT_OPEN_FLAGS for the default open flags.511 * Use AUDIOHLPFILE_DEFAULT_OPEN_FLAGS for the default open flags. 512 512 * @param pProps PCM properties to use. 513 513 */ 514 int AudioHlpFileOpen(P PDMAUDIOFILE pFile, uint32_t fOpen, PCPDMAUDIOPCMPROPS pProps)514 int AudioHlpFileOpen(PAUDIOHLPFILE pFile, uint32_t fOpen, PCPDMAUDIOPCMPROPS pProps) 515 515 { 516 516 AssertPtrReturn(pFile, VERR_INVALID_POINTER); … … 521 521 int rc; 522 522 523 if (pFile->enmType == PDMAUDIOFILETYPE_RAW)523 if (pFile->enmType == AUDIOHLPFILETYPE_RAW) 524 524 { 525 525 rc = RTFileOpen(&pFile->hFile, pFile->szName, fOpen); 526 526 } 527 else if (pFile->enmType == PDMAUDIOFILETYPE_WAV)527 else if (pFile->enmType == AUDIOHLPFILETYPE_WAV) 528 528 { 529 529 pFile->pvData = (PAUDIOWAVFILEDATA)RTMemAllocZ(sizeof(AUDIOWAVFILEDATA)); … … 594 594 * @param pszName The base filename. 595 595 * @param iInstance The device/driver instance. 596 * @param fFilename PDMAUDIOFILENAME_FLAGS_XXX.597 * @param fCreate PDMAUDIOFILE_FLAGS_XXX.596 * @param fFilename AUDIOHLPFILENAME_FLAGS_XXX. 597 * @param fCreate AUDIOHLPFILE_FLAGS_XXX. 598 598 * @param pProps PCM audio properties for the file. 599 * @param fOpen RTFILE_O_XXX or PDMAUDIOFILE_DEFAULT_OPEN_FLAGS.600 */ 601 int AudioHlpFileCreateAndOpenEx(P PDMAUDIOFILE *ppFile, PDMAUDIOFILETYPE enmType, const char *pszDir, const char *pszName,599 * @param fOpen RTFILE_O_XXX or AUDIOHLPFILE_DEFAULT_OPEN_FLAGS. 600 */ 601 int AudioHlpFileCreateAndOpenEx(PAUDIOHLPFILE *ppFile, AUDIOHLPFILETYPE enmType, const char *pszDir, const char *pszName, 602 602 uint32_t iInstance, uint32_t fFilename, uint32_t fCreate, 603 603 PCPDMAUDIOPCMPROPS pProps, uint64_t fOpen) … … 607 607 if (RT_SUCCESS(rc)) 608 608 { 609 P PDMAUDIOFILE pFile = NULL;609 PAUDIOHLPFILE pFile = NULL; 610 610 rc = AudioHlpFileCreate(enmType, szFile, fCreate, &pFile); 611 611 if (RT_SUCCESS(rc)) … … 634 634 * @param pProps PCM audio properties for the file. 635 635 */ 636 int AudioHlpFileCreateAndOpen(P PDMAUDIOFILE *ppFile, const char *pszDir, const char *pszName,636 int AudioHlpFileCreateAndOpen(PAUDIOHLPFILE *ppFile, const char *pszDir, const char *pszName, 637 637 uint32_t iInstance, PCPDMAUDIOPCMPROPS pProps) 638 638 { 639 return AudioHlpFileCreateAndOpenEx(ppFile, PDMAUDIOFILETYPE_WAV, pszDir, pszName, iInstance,640 PDMAUDIOFILENAME_FLAGS_NONE, PDMAUDIOFILE_FLAGS_NONE,641 pProps, PDMAUDIOFILE_DEFAULT_OPEN_FLAGS);639 return AudioHlpFileCreateAndOpenEx(ppFile, AUDIOHLPFILETYPE_WAV, pszDir, pszName, iInstance, 640 AUDIOHLPFILENAME_FLAGS_NONE, AUDIOHLPFILE_FLAGS_NONE, 641 pProps, AUDIOHLPFILE_DEFAULT_OPEN_FLAGS); 642 642 } 643 643 … … 649 649 * @param pFile Audio file handle to close. 650 650 */ 651 int AudioHlpFileClose(P PDMAUDIOFILE pFile)651 int AudioHlpFileClose(PAUDIOHLPFILE pFile) 652 652 { 653 653 if (!pFile) … … 658 658 int rc = VINF_SUCCESS; 659 659 660 if (pFile->enmType == PDMAUDIOFILETYPE_RAW)660 if (pFile->enmType == AUDIOHLPFILETYPE_RAW) 661 661 { 662 662 if (RTFileIsValid(pFile->hFile)) 663 663 rc = RTFileClose(pFile->hFile); 664 664 } 665 else if (pFile->enmType == PDMAUDIOFILETYPE_WAV)665 else if (pFile->enmType == AUDIOHLPFILETYPE_WAV) 666 666 { 667 667 if (RTFileIsValid(pFile->hFile)) … … 688 688 if ( RT_SUCCESS(rc) 689 689 && !cbSize 690 && !(pFile->fFlags & PDMAUDIOFILE_FLAGS_KEEP_IF_EMPTY))690 && !(pFile->fFlags & AUDIOHLPFILE_FLAGS_KEEP_IF_EMPTY)) 691 691 { 692 692 rc = AudioHlpFileDelete(pFile); … … 712 712 * @param pFile Audio file handle to delete. 713 713 */ 714 int AudioHlpFileDelete(P PDMAUDIOFILE pFile)714 int AudioHlpFileDelete(PAUDIOHLPFILE pFile) 715 715 { 716 716 AssertPtrReturn(pFile, VERR_INVALID_POINTER); … … 739 739 * @param pFile Audio file handle to retrieve the audio data size for. 740 740 */ 741 size_t AudioHlpFileGetDataSize(P PDMAUDIOFILE pFile)741 size_t AudioHlpFileGetDataSize(PAUDIOHLPFILE pFile) 742 742 { 743 743 AssertPtrReturn(pFile, 0); … … 745 745 size_t cbSize = 0; 746 746 747 if (pFile->enmType == PDMAUDIOFILETYPE_RAW)747 if (pFile->enmType == AUDIOHLPFILETYPE_RAW) 748 748 { 749 749 cbSize = RTFileTell(pFile->hFile); 750 750 } 751 else if (pFile->enmType == PDMAUDIOFILETYPE_WAV)751 else if (pFile->enmType == AUDIOHLPFILETYPE_WAV) 752 752 { 753 753 PAUDIOWAVFILEDATA pData = (PAUDIOWAVFILEDATA)pFile->pvData; … … 765 765 * @param pFile Audio file handle to check open status for. 766 766 */ 767 bool AudioHlpFileIsOpen(P PDMAUDIOFILE pFile)767 bool AudioHlpFileIsOpen(PAUDIOHLPFILE pFile) 768 768 { 769 769 if (!pFile) … … 782 782 * @param fFlags Additional write flags. Not being used at the moment and must be 0. 783 783 */ 784 int AudioHlpFileWrite(P PDMAUDIOFILE pFile, const void *pvBuf, size_t cbBuf, uint32_t fFlags)784 int AudioHlpFileWrite(PAUDIOHLPFILE pFile, const void *pvBuf, size_t cbBuf, uint32_t fFlags) 785 785 { 786 786 AssertPtrReturn(pFile, VERR_INVALID_POINTER); … … 796 796 int rc; 797 797 798 if (pFile->enmType == PDMAUDIOFILETYPE_RAW)798 if (pFile->enmType == AUDIOHLPFILETYPE_RAW) 799 799 { 800 800 rc = RTFileWrite(pFile->hFile, pvBuf, cbBuf, NULL); 801 801 } 802 else if (pFile->enmType == PDMAUDIOFILETYPE_WAV)802 else if (pFile->enmType == AUDIOHLPFILETYPE_WAV) 803 803 { 804 804 PAUDIOWAVFILEDATA pData = (PAUDIOWAVFILEDATA)pFile->pvData; -
trunk/src/VBox/Devices/Audio/AudioHlp.h
r88292 r88357 48 48 /** @} */ 49 49 50 /** @name Audio file (name) helper methods.51 * @{ */52 int AudioHlpFileNameSanitize(char *pszPath, size_t cbPath);53 int AudioHlpFileNameGet(char *pszFile, size_t cchFile, const char *pszPath, const char *pszName,54 uint32_t uInstance, PDMAUDIOFILETYPE enmType, uint32_t fFlags);55 /** @} */56 57 50 /** @name Audio string-ify methods. 58 51 * @{ */ … … 60 53 /** @} */ 61 54 55 56 /** @name AUDIOHLPFILE_FLAGS_XXX 57 * @{ */ 58 /** No flags defined. */ 59 #define AUDIOHLPFILE_FLAGS_NONE UINT32_C(0) 60 /** Keep the audio file even if it contains no audio data. */ 61 #define AUDIOHLPFILE_FLAGS_KEEP_IF_EMPTY RT_BIT_32(0) 62 /** Audio file flag validation mask. */ 63 #define AUDIOHLPFILE_FLAGS_VALID_MASK UINT32_C(0x1) 64 /** @} */ 65 66 /** Audio file default open flags. */ 67 #define AUDIOHLPFILE_DEFAULT_OPEN_FLAGS (RTFILE_O_OPEN_CREATE | RTFILE_O_APPEND | RTFILE_O_WRITE | RTFILE_O_DENY_WRITE) 68 69 /** 70 * Audio file types. 71 */ 72 typedef enum AUDIOHLPFILETYPE 73 { 74 /** The customary invalid zero value. */ 75 AUDIOHLPFILETYPE_INVALID = 0, 76 /** Unknown type, do not use. */ 77 AUDIOHLPFILETYPE_UNKNOWN, 78 /** Raw (PCM) file. */ 79 AUDIOHLPFILETYPE_RAW, 80 /** Wave (.WAV) file. */ 81 AUDIOHLPFILETYPE_WAV, 82 /** Hack to blow the type up to 32-bit. */ 83 AUDIOHLPFILETYPE_32BIT_HACK = 0x7fffffff 84 } AUDIOHLPFILETYPE; 85 86 /** @name Audio file (name) helper methods. 87 * @{ */ 88 int AudioHlpFileNameSanitize(char *pszPath, size_t cbPath); 89 int AudioHlpFileNameGet(char *pszFile, size_t cchFile, const char *pszPath, const char *pszName, 90 uint32_t uInstance, AUDIOHLPFILETYPE enmType, uint32_t fFlags); 91 /** @} */ 92 93 /** @name AUDIOHLPFILENAME_FLAGS_XXX 94 * @{ */ 95 /** No flags defined. */ 96 #define AUDIOHLPFILENAME_FLAGS_NONE UINT32_C(0) 97 /** Adds an ISO timestamp to the file name. */ 98 #define AUDIOHLPFILENAME_FLAGS_TS RT_BIT(0) 99 /** @} */ 100 101 /** 102 * Audio file handle. 103 */ 104 typedef struct AUDIOHLPFILE 105 { 106 /** Type of the audio file. */ 107 AUDIOHLPFILETYPE enmType; 108 /** Audio file flags, AUDIOHLPFILE_FLAGS_XXX. */ 109 uint32_t fFlags; 110 /** Actual file handle. */ 111 RTFILE hFile; 112 /** Data needed for the specific audio file type implemented. 113 * Optional, can be NULL. */ 114 void *pvData; 115 /** Data size (in bytes). */ 116 size_t cbData; 117 /** File name and path. */ 118 char szName[RTPATH_MAX]; 119 } AUDIOHLPFILE; 120 /** Pointer to an audio file handle. */ 121 typedef AUDIOHLPFILE *PAUDIOHLPFILE; 122 62 123 /** @name Audio file methods. 63 124 * @{ */ 64 int AudioHlpFileCreateAndOpen(P PDMAUDIOFILE *ppFile, const char *pszDir, const char *pszName,125 int AudioHlpFileCreateAndOpen(PAUDIOHLPFILE *ppFile, const char *pszDir, const char *pszName, 65 126 uint32_t iInstance, PCPDMAUDIOPCMPROPS pProps); 66 int AudioHlpFileCreateAndOpenEx(P PDMAUDIOFILE *ppFile, PDMAUDIOFILETYPE enmType, const char *pszDir, const char *pszName,127 int AudioHlpFileCreateAndOpenEx(PAUDIOHLPFILE *ppFile, AUDIOHLPFILETYPE enmType, const char *pszDir, const char *pszName, 67 128 uint32_t iInstance, uint32_t fFilename, uint32_t fCreate, 68 129 PCPDMAUDIOPCMPROPS pProps, uint64_t fOpen); 69 int AudioHlpFileCreate( PDMAUDIOFILETYPE enmType, const char *pszFile, uint32_t fFlags, PPDMAUDIOFILE *ppFile);70 void AudioHlpFileDestroy(P PDMAUDIOFILE pFile);71 int AudioHlpFileOpen(P PDMAUDIOFILE pFile, uint32_t fOpen, PCPDMAUDIOPCMPROPS pProps);72 int AudioHlpFileClose(P PDMAUDIOFILE pFile);73 int AudioHlpFileDelete(P PDMAUDIOFILE pFile);74 size_t AudioHlpFileGetDataSize(P PDMAUDIOFILE pFile);75 bool AudioHlpFileIsOpen(P PDMAUDIOFILE pFile);76 int AudioHlpFileWrite(P PDMAUDIOFILE pFile, const void *pvBuf, size_t cbBuf, uint32_t fFlags);130 int AudioHlpFileCreate(AUDIOHLPFILETYPE enmType, const char *pszFile, uint32_t fFlags, PAUDIOHLPFILE *ppFile); 131 void AudioHlpFileDestroy(PAUDIOHLPFILE pFile); 132 int AudioHlpFileOpen(PAUDIOHLPFILE pFile, uint32_t fOpen, PCPDMAUDIOPCMPROPS pProps); 133 int AudioHlpFileClose(PAUDIOHLPFILE pFile); 134 int AudioHlpFileDelete(PAUDIOHLPFILE pFile); 135 size_t AudioHlpFileGetDataSize(PAUDIOHLPFILE pFile); 136 bool AudioHlpFileIsOpen(PAUDIOHLPFILE pFile); 137 int AudioHlpFileWrite(PAUDIOHLPFILE pFile, const void *pvBuf, size_t cbBuf, uint32_t fFlags); 77 138 /** @} */ 78 139 -
trunk/src/VBox/Devices/Audio/AudioMixer.cpp
r88356 r88357 1519 1519 char szFile[RTPATH_MAX]; 1520 1520 int rc2 = AudioHlpFileNameGet(szFile, RT_ELEMENTS(szFile), NULL /* Use temporary directory */, szName, 1521 0 /* Instance */, PDMAUDIOFILETYPE_WAV, PDMAUDIOFILENAME_FLAGS_NONE);1521 0 /* Instance */, AUDIOHLPFILETYPE_WAV, AUDIOHLPFILENAME_FLAGS_NONE); 1522 1522 if (RT_SUCCESS(rc2)) 1523 1523 { 1524 rc2 = AudioHlpFileCreate( PDMAUDIOFILETYPE_WAV, szFile, PDMAUDIOFILE_FLAGS_NONE, &pSink->Dbg.pFile);1524 rc2 = AudioHlpFileCreate(AUDIOHLPFILETYPE_WAV, szFile, AUDIOHLPFILE_FLAGS_NONE, &pSink->Dbg.pFile); 1525 1525 if (RT_SUCCESS(rc2)) 1526 rc2 = AudioHlpFileOpen(pSink->Dbg.pFile, PDMAUDIOFILE_DEFAULT_OPEN_FLAGS, &pSink->PCMProps);1526 rc2 = AudioHlpFileOpen(pSink->Dbg.pFile, AUDIOHLPFILE_DEFAULT_OPEN_FLAGS, &pSink->PCMProps); 1527 1527 } 1528 1528 } -
trunk/src/VBox/Devices/Audio/AudioMixer.h
r88356 r88357 30 30 #include <VBox/vmm/pdmaudioifs.h> 31 31 #include "AudioMixBuffer.h" 32 #include "AudioHlp.h" 32 33 33 34 … … 236 237 struct 237 238 { 238 P PDMAUDIOFILE pFile;239 PAUDIOHLPFILE pFile; 239 240 } Dbg; 240 241 } AUDMIXSINK; -
trunk/src/VBox/Devices/Audio/DevHdaStream.cpp
r88313 r88357 119 119 120 120 int rc2 = AudioHlpFileNameGet(szPath, sizeof(szPath), pThisCC->Dbg.pszOutPath, szFile, 121 0 /* uInst */, PDMAUDIOFILETYPE_WAV, PDMAUDIOFILENAME_FLAGS_NONE);121 0 /* uInst */, AUDIOHLPFILETYPE_WAV, AUDIOHLPFILENAME_FLAGS_NONE); 122 122 AssertRC(rc2); 123 123 124 rc2 = AudioHlpFileCreate( PDMAUDIOFILETYPE_WAV, szPath, PDMAUDIOFILE_FLAGS_NONE, &pStreamR3->Dbg.Runtime.pFileStream);124 rc2 = AudioHlpFileCreate(AUDIOHLPFILETYPE_WAV, szPath, AUDIOHLPFILE_FLAGS_NONE, &pStreamR3->Dbg.Runtime.pFileStream); 125 125 AssertRC(rc2); 126 126 … … 132 132 133 133 rc2 = AudioHlpFileNameGet(szPath, sizeof(szPath), pThisCC->Dbg.pszOutPath, szFile, 134 0 /* uInst */, PDMAUDIOFILETYPE_WAV, PDMAUDIOFILENAME_FLAGS_NONE);134 0 /* uInst */, AUDIOHLPFILETYPE_WAV, AUDIOHLPFILENAME_FLAGS_NONE); 135 135 AssertRC(rc2); 136 136 137 rc2 = AudioHlpFileCreate( PDMAUDIOFILETYPE_WAV, szPath, PDMAUDIOFILE_FLAGS_NONE, &pStreamR3->Dbg.Runtime.pFileDMARaw);137 rc2 = AudioHlpFileCreate(AUDIOHLPFILETYPE_WAV, szPath, AUDIOHLPFILE_FLAGS_NONE, &pStreamR3->Dbg.Runtime.pFileDMARaw); 138 138 AssertRC(rc2); 139 139 … … 145 145 146 146 rc2 = AudioHlpFileNameGet(szPath, sizeof(szPath), pThisCC->Dbg.pszOutPath, szFile, 147 0 /* uInst */, PDMAUDIOFILETYPE_WAV, PDMAUDIOFILENAME_FLAGS_NONE);147 0 /* uInst */, AUDIOHLPFILETYPE_WAV, AUDIOHLPFILENAME_FLAGS_NONE); 148 148 AssertRC(rc2); 149 149 150 rc2 = AudioHlpFileCreate( PDMAUDIOFILETYPE_WAV, szPath, PDMAUDIOFILE_FLAGS_NONE, &pStreamR3->Dbg.Runtime.pFileDMAMapped);150 rc2 = AudioHlpFileCreate(AUDIOHLPFILETYPE_WAV, szPath, AUDIOHLPFILE_FLAGS_NONE, &pStreamR3->Dbg.Runtime.pFileDMAMapped); 151 151 AssertRC(rc2); 152 152 … … 916 916 if (!AudioHlpFileIsOpen(pStreamR3->Dbg.Runtime.pFileStream)) 917 917 { 918 int rc2 = AudioHlpFileOpen(pStreamR3->Dbg.Runtime.pFileStream, PDMAUDIOFILE_DEFAULT_OPEN_FLAGS,918 int rc2 = AudioHlpFileOpen(pStreamR3->Dbg.Runtime.pFileStream, AUDIOHLPFILE_DEFAULT_OPEN_FLAGS, 919 919 &pStreamShared->State.Cfg.Props); 920 920 AssertRC(rc2); … … 923 923 if (!AudioHlpFileIsOpen(pStreamR3->Dbg.Runtime.pFileDMARaw)) 924 924 { 925 int rc2 = AudioHlpFileOpen(pStreamR3->Dbg.Runtime.pFileDMARaw, PDMAUDIOFILE_DEFAULT_OPEN_FLAGS,925 int rc2 = AudioHlpFileOpen(pStreamR3->Dbg.Runtime.pFileDMARaw, AUDIOHLPFILE_DEFAULT_OPEN_FLAGS, 926 926 &pStreamShared->State.Cfg.Props); 927 927 AssertRC(rc2); … … 930 930 if (!AudioHlpFileIsOpen(pStreamR3->Dbg.Runtime.pFileDMAMapped)) 931 931 { 932 int rc2 = AudioHlpFileOpen(pStreamR3->Dbg.Runtime.pFileDMAMapped, PDMAUDIOFILE_DEFAULT_OPEN_FLAGS,932 int rc2 = AudioHlpFileOpen(pStreamR3->Dbg.Runtime.pFileDMAMapped, AUDIOHLPFILE_DEFAULT_OPEN_FLAGS, 933 933 &pStreamShared->State.Cfg.Props); 934 934 AssertRC(rc2); -
trunk/src/VBox/Devices/Audio/DevHdaStream.h
r88307 r88357 61 61 * For input streams, this dumps data being written to the device FIFO, 62 62 * whereas for output streams this dumps data being read from the device FIFO. */ 63 R3PTRTYPE(P PDMAUDIOFILE) pFileStream;63 R3PTRTYPE(PAUDIOHLPFILE) pFileStream; 64 64 /** File for dumping raw DMA reads / writes. 65 65 * For input streams, this dumps data being written to the device DMA, 66 66 * whereas for output streams this dumps data being read from the device DMA. */ 67 R3PTRTYPE(P PDMAUDIOFILE) pFileDMARaw;67 R3PTRTYPE(PAUDIOHLPFILE) pFileDMARaw; 68 68 /** File for dumping mapped (that is, extracted) DMA reads / writes. */ 69 R3PTRTYPE(P PDMAUDIOFILE) pFileDMAMapped;69 R3PTRTYPE(PAUDIOHLPFILE) pFileDMAMapped; 70 70 } HDASTREAMDEBUGRT; 71 71 -
trunk/src/VBox/Devices/Audio/DevIchAc97.cpp
r88307 r88357 402 402 * For input streams, this dumps data being written to the device FIFO, 403 403 * whereas for output streams this dumps data being read from the device FIFO. */ 404 R3PTRTYPE(P PDMAUDIOFILE) pFileStream;404 R3PTRTYPE(PAUDIOHLPFILE) pFileStream; 405 405 /** File for dumping DMA reads / writes. 406 406 * For input streams, this dumps data being written to the device DMA, 407 407 * whereas for output streams this dumps data being read from the device DMA. */ 408 R3PTRTYPE(P PDMAUDIOFILE) pFileDMA;408 R3PTRTYPE(PAUDIOHLPFILE) pFileDMA; 409 409 } AC97STREAMDEBUGRT; 410 410 … … 1005 1005 if (!AudioHlpFileIsOpen(pStreamCC->Dbg.Runtime.pFileStream)) 1006 1006 { 1007 int rc2 = AudioHlpFileOpen(pStreamCC->Dbg.Runtime.pFileStream, PDMAUDIOFILE_DEFAULT_OPEN_FLAGS,1007 int rc2 = AudioHlpFileOpen(pStreamCC->Dbg.Runtime.pFileStream, AUDIOHLPFILE_DEFAULT_OPEN_FLAGS, 1008 1008 &pStreamCC->State.Cfg.Props); 1009 1009 AssertRC(rc2); … … 1012 1012 if (!AudioHlpFileIsOpen(pStreamCC->Dbg.Runtime.pFileDMA)) 1013 1013 { 1014 int rc2 = AudioHlpFileOpen(pStreamCC->Dbg.Runtime.pFileDMA, PDMAUDIOFILE_DEFAULT_OPEN_FLAGS,1014 int rc2 = AudioHlpFileOpen(pStreamCC->Dbg.Runtime.pFileDMA, AUDIOHLPFILE_DEFAULT_OPEN_FLAGS, 1015 1015 &pStreamCC->State.Cfg.Props); 1016 1016 AssertRC(rc2); … … 1106 1106 char szPath[RTPATH_MAX]; 1107 1107 int rc2 = AudioHlpFileNameGet(szPath, sizeof(szPath), pThisCC->Dbg.pszOutPath, szFile, 1108 0 /* uInst */, PDMAUDIOFILETYPE_WAV, PDMAUDIOFILENAME_FLAGS_NONE);1108 0 /* uInst */, AUDIOHLPFILETYPE_WAV, AUDIOHLPFILENAME_FLAGS_NONE); 1109 1109 AssertRC(rc2); 1110 rc2 = AudioHlpFileCreate( PDMAUDIOFILETYPE_WAV, szPath, PDMAUDIOFILE_FLAGS_NONE, &pStreamCC->Dbg.Runtime.pFileStream);1110 rc2 = AudioHlpFileCreate(AUDIOHLPFILETYPE_WAV, szPath, AUDIOHLPFILE_FLAGS_NONE, &pStreamCC->Dbg.Runtime.pFileStream); 1111 1111 AssertRC(rc2); 1112 1112 … … 1117 1117 1118 1118 rc2 = AudioHlpFileNameGet(szPath, sizeof(szPath), pThisCC->Dbg.pszOutPath, szFile, 1119 0 /* uInst */, PDMAUDIOFILETYPE_WAV, PDMAUDIOFILENAME_FLAGS_NONE);1119 0 /* uInst */, AUDIOHLPFILETYPE_WAV, AUDIOHLPFILENAME_FLAGS_NONE); 1120 1120 AssertRC(rc2); 1121 1121 1122 rc2 = AudioHlpFileCreate( PDMAUDIOFILETYPE_WAV, szPath, PDMAUDIOFILE_FLAGS_NONE, &pStreamCC->Dbg.Runtime.pFileDMA);1122 rc2 = AudioHlpFileCreate(AUDIOHLPFILETYPE_WAV, szPath, AUDIOHLPFILE_FLAGS_NONE, &pStreamCC->Dbg.Runtime.pFileDMA); 1123 1123 AssertRC(rc2); 1124 1124 -
trunk/src/VBox/Devices/Audio/DrvAudio.cpp
r88356 r88357 141 141 { 142 142 /** File for writing stream reads. */ 143 P PDMAUDIOFILE pFileStreamRead;143 PAUDIOHLPFILE pFileStreamRead; 144 144 /** File for writing non-interleaved captures. */ 145 P PDMAUDIOFILE pFileCaptureNonInterleaved;145 PAUDIOHLPFILE pFileCaptureNonInterleaved; 146 146 } Dbg; 147 147 struct … … 164 164 { 165 165 /** File for writing stream writes. */ 166 P PDMAUDIOFILE pFileStreamWrite;166 PAUDIOHLPFILE pFileStreamWrite; 167 167 /** File for writing stream playback. */ 168 P PDMAUDIOFILE pFilePlayNonInterleaved;168 PAUDIOHLPFILE pFilePlayNonInterleaved; 169 169 } Dbg; 170 170 struct -
trunk/src/VBox/Devices/Audio/DrvHostAudioDebug.cpp
r88286 r88357 39 39 PPDMAUDIOSTREAMCFG pCfg; 40 40 /** Audio file to dump output to or read input from. */ 41 P PDMAUDIOFILE pFile;41 PAUDIOHLPFILE pFile; 42 42 union 43 43 { … … 135 135 char szFile[RTPATH_MAX]; 136 136 int rc = AudioHlpFileNameGet(szFile, RT_ELEMENTS(szFile), NULL /* Use temporary directory */, fIn ? "DebugAudioIn" : "DebugAudioOut", 137 pDrv->pDrvIns->iInstance, PDMAUDIOFILETYPE_WAV, PDMAUDIOFILENAME_FLAGS_NONE);137 pDrv->pDrvIns->iInstance, AUDIOHLPFILETYPE_WAV, AUDIOHLPFILENAME_FLAGS_NONE); 138 138 if (RT_SUCCESS(rc)) 139 139 { 140 rc = AudioHlpFileCreate( PDMAUDIOFILETYPE_WAV, szFile, PDMAUDIOFILE_FLAGS_NONE, &pStreamDbg->pFile);140 rc = AudioHlpFileCreate(AUDIOHLPFILETYPE_WAV, szFile, AUDIOHLPFILE_FLAGS_NONE, &pStreamDbg->pFile); 141 141 if (RT_SUCCESS(rc)) 142 142 rc = AudioHlpFileOpen(pStreamDbg->pFile, RTFILE_O_WRITE | RTFILE_O_DENY_WRITE | RTFILE_O_CREATE_REPLACE, &pCfg->Props);
Note:
See TracChangeset
for help on using the changeset viewer.