VirtualBox

Changeset 88357 in vbox


Ignore:
Timestamp:
Apr 4, 2021 10:58:35 PM (4 years ago)
Author:
vboxsync
Message:

Audio: Moved PDMAUDIOFILE and associated stuff out of pdmaudioifs.h and into AudioHlp.h, renaming the typedefs & defines. bugref:9890

Location:
trunk
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/VBox/vmm/pdmaudioifs.h

    r88356 r88357  
    905905
    906906
    907 /** @name PDMAUDIOFILE_FLAGS_XXX
    908  * @{ */
    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 PDMAUDIOFILETYPE
    926 {
    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 = 0x7fffffff
    937 } PDMAUDIOFILETYPE;
    938 
    939 /** @name PDMAUDIOFILENAME_FLAGS_XXX
    940  * @{ */
    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 PDMAUDIOFILE
    951 {
    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 
    969907/** @name PDMAUDIOSTREAMSTS_FLAGS_XXX
    970908 * @{ */
  • trunk/src/VBox/Devices/Audio/AudioHlp.cpp

    r88300 r88357  
    321321 * @param   uInstance           Device / driver instance which is using this file.
    322322 * @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.
    324324 */
    325325int 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)
    327327{
    328328    AssertPtrReturn(pszFile, VERR_INVALID_POINTER);
     
    370370        szFileName[0] = '\0';
    371371
    372         if (fFlags & PDMAUDIOFILENAME_FLAGS_TS)
     372        if (fFlags & AUDIOHLPFILENAME_FLAGS_TS)
    373373        {
    374374            RTTIMESPEC time;
     
    404404        switch (enmType)
    405405        {
    406             case PDMAUDIOFILETYPE_RAW:
     406            case AUDIOHLPFILETYPE_RAW:
    407407                rc = RTStrCat(szFileName, sizeof(szFileName), ".pcm");
    408408                break;
    409409
    410             case PDMAUDIOFILETYPE_WAV:
     410            case AUDIOHLPFILETYPE_WAV:
    411411                rc = RTStrCat(szFileName, sizeof(szFileName), ".wav");
    412412                break;
     
    440440 * @param   enmType             Audio file type to open / create.
    441441 * @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.
    443443 * @param   ppFile              Where to store the created audio file handle.
    444444 *                              Needs to be destroyed with AudioHlpFileDestroy().
    445445 */
    446 int AudioHlpFileCreate(PDMAUDIOFILETYPE enmType, const char *pszFile, uint32_t fFlags, PPDMAUDIOFILE *ppFile)
     446int AudioHlpFileCreate(AUDIOHLPFILETYPE enmType, const char *pszFile, uint32_t fFlags, PAUDIOHLPFILE *ppFile)
    447447{
    448448    AssertPtrReturn(pszFile, VERR_INVALID_POINTER);
    449449    /** @todo Validate fFlags. */
    450450
    451     PPDMAUDIOFILE pFile = (PPDMAUDIOFILE)RTMemAlloc(sizeof(PDMAUDIOFILE));
     451    PAUDIOHLPFILE pFile = (PAUDIOHLPFILE)RTMemAlloc(sizeof(AUDIOHLPFILE));
    452452    if (!pFile)
    453453        return VERR_NO_MEMORY;
     
    457457    switch (enmType)
    458458    {
    459         case PDMAUDIOFILETYPE_RAW:
    460         case PDMAUDIOFILETYPE_WAV:
     459        case AUDIOHLPFILETYPE_RAW:
     460        case AUDIOHLPFILETYPE_WAV:
    461461            pFile->enmType = enmType;
    462462            break;
     
    492492 * @param   pFile               Audio file (object) to destroy.
    493493 */
    494 void AudioHlpFileDestroy(PPDMAUDIOFILE pFile)
     494void AudioHlpFileDestroy(PAUDIOHLPFILE pFile)
    495495{
    496496    if (!pFile)
     
    509509 * @param   pFile               Pointer to audio file handle to use.
    510510 * @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.
    512512 * @param   pProps              PCM properties to use.
    513513 */
    514 int AudioHlpFileOpen(PPDMAUDIOFILE pFile, uint32_t fOpen, PCPDMAUDIOPCMPROPS pProps)
     514int AudioHlpFileOpen(PAUDIOHLPFILE pFile, uint32_t fOpen, PCPDMAUDIOPCMPROPS pProps)
    515515{
    516516    AssertPtrReturn(pFile,   VERR_INVALID_POINTER);
     
    521521    int rc;
    522522
    523     if (pFile->enmType == PDMAUDIOFILETYPE_RAW)
     523    if (pFile->enmType == AUDIOHLPFILETYPE_RAW)
    524524    {
    525525        rc = RTFileOpen(&pFile->hFile, pFile->szName, fOpen);
    526526    }
    527     else if (pFile->enmType == PDMAUDIOFILETYPE_WAV)
     527    else if (pFile->enmType == AUDIOHLPFILETYPE_WAV)
    528528    {
    529529        pFile->pvData = (PAUDIOWAVFILEDATA)RTMemAllocZ(sizeof(AUDIOWAVFILEDATA));
     
    594594 * @param   pszName     The base filename.
    595595 * @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.
    598598 * @param   pProps      PCM audio properties for the file.
    599  * @param   fOpen       RTFILE_O_XXX or PDMAUDIOFILE_DEFAULT_OPEN_FLAGS.
    600  */
    601 int AudioHlpFileCreateAndOpenEx(PPDMAUDIOFILE *ppFile, PDMAUDIOFILETYPE enmType, const char *pszDir, const char *pszName,
     599 * @param   fOpen       RTFILE_O_XXX or AUDIOHLPFILE_DEFAULT_OPEN_FLAGS.
     600 */
     601int AudioHlpFileCreateAndOpenEx(PAUDIOHLPFILE *ppFile, AUDIOHLPFILETYPE enmType, const char *pszDir, const char *pszName,
    602602                                uint32_t iInstance, uint32_t fFilename, uint32_t fCreate,
    603603                                PCPDMAUDIOPCMPROPS pProps, uint64_t fOpen)
     
    607607    if (RT_SUCCESS(rc))
    608608    {
    609         PPDMAUDIOFILE pFile = NULL;
     609        PAUDIOHLPFILE pFile = NULL;
    610610        rc = AudioHlpFileCreate(enmType, szFile, fCreate, &pFile);
    611611        if (RT_SUCCESS(rc))
     
    634634 * @param   pProps      PCM audio properties for the file.
    635635 */
    636 int AudioHlpFileCreateAndOpen(PPDMAUDIOFILE *ppFile, const char *pszDir, const char *pszName,
     636int AudioHlpFileCreateAndOpen(PAUDIOHLPFILE *ppFile, const char *pszDir, const char *pszName,
    637637                              uint32_t iInstance, PCPDMAUDIOPCMPROPS pProps)
    638638{
    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);
    642642}
    643643
     
    649649 * @param   pFile               Audio file handle to close.
    650650 */
    651 int AudioHlpFileClose(PPDMAUDIOFILE pFile)
     651int AudioHlpFileClose(PAUDIOHLPFILE pFile)
    652652{
    653653    if (!pFile)
     
    658658    int rc = VINF_SUCCESS;
    659659
    660     if (pFile->enmType == PDMAUDIOFILETYPE_RAW)
     660    if (pFile->enmType == AUDIOHLPFILETYPE_RAW)
    661661    {
    662662        if (RTFileIsValid(pFile->hFile))
    663663            rc = RTFileClose(pFile->hFile);
    664664    }
    665     else if (pFile->enmType == PDMAUDIOFILETYPE_WAV)
     665    else if (pFile->enmType == AUDIOHLPFILETYPE_WAV)
    666666    {
    667667        if (RTFileIsValid(pFile->hFile))
     
    688688    if (   RT_SUCCESS(rc)
    689689        && !cbSize
    690         && !(pFile->fFlags & PDMAUDIOFILE_FLAGS_KEEP_IF_EMPTY))
     690        && !(pFile->fFlags & AUDIOHLPFILE_FLAGS_KEEP_IF_EMPTY))
    691691    {
    692692        rc = AudioHlpFileDelete(pFile);
     
    712712 * @param   pFile               Audio file handle to delete.
    713713 */
    714 int AudioHlpFileDelete(PPDMAUDIOFILE pFile)
     714int AudioHlpFileDelete(PAUDIOHLPFILE pFile)
    715715{
    716716    AssertPtrReturn(pFile, VERR_INVALID_POINTER);
     
    739739 * @param   pFile               Audio file handle to retrieve the audio data size for.
    740740 */
    741 size_t AudioHlpFileGetDataSize(PPDMAUDIOFILE pFile)
     741size_t AudioHlpFileGetDataSize(PAUDIOHLPFILE pFile)
    742742{
    743743    AssertPtrReturn(pFile, 0);
     
    745745    size_t cbSize = 0;
    746746
    747     if (pFile->enmType == PDMAUDIOFILETYPE_RAW)
     747    if (pFile->enmType == AUDIOHLPFILETYPE_RAW)
    748748    {
    749749        cbSize = RTFileTell(pFile->hFile);
    750750    }
    751     else if (pFile->enmType == PDMAUDIOFILETYPE_WAV)
     751    else if (pFile->enmType == AUDIOHLPFILETYPE_WAV)
    752752    {
    753753        PAUDIOWAVFILEDATA pData = (PAUDIOWAVFILEDATA)pFile->pvData;
     
    765765 * @param   pFile               Audio file handle to check open status for.
    766766 */
    767 bool AudioHlpFileIsOpen(PPDMAUDIOFILE pFile)
     767bool AudioHlpFileIsOpen(PAUDIOHLPFILE pFile)
    768768{
    769769    if (!pFile)
     
    782782 * @param   fFlags              Additional write flags. Not being used at the moment and must be 0.
    783783 */
    784 int AudioHlpFileWrite(PPDMAUDIOFILE pFile, const void *pvBuf, size_t cbBuf, uint32_t fFlags)
     784int AudioHlpFileWrite(PAUDIOHLPFILE pFile, const void *pvBuf, size_t cbBuf, uint32_t fFlags)
    785785{
    786786    AssertPtrReturn(pFile, VERR_INVALID_POINTER);
     
    796796    int rc;
    797797
    798     if (pFile->enmType == PDMAUDIOFILETYPE_RAW)
     798    if (pFile->enmType == AUDIOHLPFILETYPE_RAW)
    799799    {
    800800        rc = RTFileWrite(pFile->hFile, pvBuf, cbBuf, NULL);
    801801    }
    802     else if (pFile->enmType == PDMAUDIOFILETYPE_WAV)
     802    else if (pFile->enmType == AUDIOHLPFILETYPE_WAV)
    803803    {
    804804        PAUDIOWAVFILEDATA pData = (PAUDIOWAVFILEDATA)pFile->pvData;
  • trunk/src/VBox/Devices/Audio/AudioHlp.h

    r88292 r88357  
    4848/** @}  */
    4949
    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 
    5750/** @name Audio string-ify methods.
    5851 * @{ */
     
    6053/** @}  */
    6154
     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 */
     72typedef 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 * @{ */
     88int     AudioHlpFileNameSanitize(char *pszPath, size_t cbPath);
     89int     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 */
     104typedef 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. */
     121typedef AUDIOHLPFILE *PAUDIOHLPFILE;
     122
    62123/** @name Audio file methods.
    63124 * @{ */
    64 int     AudioHlpFileCreateAndOpen(PPDMAUDIOFILE *ppFile, const char *pszDir, const char *pszName,
     125int     AudioHlpFileCreateAndOpen(PAUDIOHLPFILE *ppFile, const char *pszDir, const char *pszName,
    65126                                  uint32_t iInstance, PCPDMAUDIOPCMPROPS pProps);
    66 int     AudioHlpFileCreateAndOpenEx(PPDMAUDIOFILE *ppFile, PDMAUDIOFILETYPE enmType, const char *pszDir, const char *pszName,
     127int     AudioHlpFileCreateAndOpenEx(PAUDIOHLPFILE *ppFile, AUDIOHLPFILETYPE enmType, const char *pszDir, const char *pszName,
    67128                                    uint32_t iInstance, uint32_t fFilename, uint32_t fCreate,
    68129                                    PCPDMAUDIOPCMPROPS pProps, uint64_t fOpen);
    69 int     AudioHlpFileCreate(PDMAUDIOFILETYPE enmType, const char *pszFile, uint32_t fFlags, PPDMAUDIOFILE *ppFile);
    70 void    AudioHlpFileDestroy(PPDMAUDIOFILE pFile);
    71 int     AudioHlpFileOpen(PPDMAUDIOFILE pFile, uint32_t fOpen, PCPDMAUDIOPCMPROPS pProps);
    72 int     AudioHlpFileClose(PPDMAUDIOFILE pFile);
    73 int     AudioHlpFileDelete(PPDMAUDIOFILE pFile);
    74 size_t  AudioHlpFileGetDataSize(PPDMAUDIOFILE pFile);
    75 bool    AudioHlpFileIsOpen(PPDMAUDIOFILE pFile);
    76 int     AudioHlpFileWrite(PPDMAUDIOFILE pFile, const void *pvBuf, size_t cbBuf, uint32_t fFlags);
     130int     AudioHlpFileCreate(AUDIOHLPFILETYPE enmType, const char *pszFile, uint32_t fFlags, PAUDIOHLPFILE *ppFile);
     131void    AudioHlpFileDestroy(PAUDIOHLPFILE pFile);
     132int     AudioHlpFileOpen(PAUDIOHLPFILE pFile, uint32_t fOpen, PCPDMAUDIOPCMPROPS pProps);
     133int     AudioHlpFileClose(PAUDIOHLPFILE pFile);
     134int     AudioHlpFileDelete(PAUDIOHLPFILE pFile);
     135size_t  AudioHlpFileGetDataSize(PAUDIOHLPFILE pFile);
     136bool    AudioHlpFileIsOpen(PAUDIOHLPFILE pFile);
     137int     AudioHlpFileWrite(PAUDIOHLPFILE pFile, const void *pvBuf, size_t cbBuf, uint32_t fFlags);
    77138/** @}  */
    78139
  • trunk/src/VBox/Devices/Audio/AudioMixer.cpp

    r88356 r88357  
    15191519        char szFile[RTPATH_MAX];
    15201520        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);
    15221522        if (RT_SUCCESS(rc2))
    15231523        {
    1524             rc2 = AudioHlpFileCreate(PDMAUDIOFILETYPE_WAV, szFile, PDMAUDIOFILE_FLAGS_NONE, &pSink->Dbg.pFile);
     1524            rc2 = AudioHlpFileCreate(AUDIOHLPFILETYPE_WAV, szFile, AUDIOHLPFILE_FLAGS_NONE, &pSink->Dbg.pFile);
    15251525            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);
    15271527        }
    15281528    }
  • trunk/src/VBox/Devices/Audio/AudioMixer.h

    r88356 r88357  
    3030#include <VBox/vmm/pdmaudioifs.h>
    3131#include "AudioMixBuffer.h"
     32#include "AudioHlp.h"
    3233
    3334
     
    236237    struct
    237238    {
    238         PPDMAUDIOFILE       pFile;
     239        PAUDIOHLPFILE       pFile;
    239240    } Dbg;
    240241} AUDMIXSINK;
  • trunk/src/VBox/Devices/Audio/DevHdaStream.cpp

    r88313 r88357  
    119119
    120120        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);
    122122        AssertRC(rc2);
    123123
    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);
    125125        AssertRC(rc2);
    126126
     
    132132
    133133        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);
    135135        AssertRC(rc2);
    136136
    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);
    138138        AssertRC(rc2);
    139139
     
    145145
    146146        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);
    148148        AssertRC(rc2);
    149149
    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);
    151151        AssertRC(rc2);
    152152
     
    916916            if (!AudioHlpFileIsOpen(pStreamR3->Dbg.Runtime.pFileStream))
    917917            {
    918                 int rc2 = AudioHlpFileOpen(pStreamR3->Dbg.Runtime.pFileStream, PDMAUDIOFILE_DEFAULT_OPEN_FLAGS,
     918                int rc2 = AudioHlpFileOpen(pStreamR3->Dbg.Runtime.pFileStream, AUDIOHLPFILE_DEFAULT_OPEN_FLAGS,
    919919                                           &pStreamShared->State.Cfg.Props);
    920920                AssertRC(rc2);
     
    923923            if (!AudioHlpFileIsOpen(pStreamR3->Dbg.Runtime.pFileDMARaw))
    924924            {
    925                 int rc2 = AudioHlpFileOpen(pStreamR3->Dbg.Runtime.pFileDMARaw, PDMAUDIOFILE_DEFAULT_OPEN_FLAGS,
     925                int rc2 = AudioHlpFileOpen(pStreamR3->Dbg.Runtime.pFileDMARaw, AUDIOHLPFILE_DEFAULT_OPEN_FLAGS,
    926926                                           &pStreamShared->State.Cfg.Props);
    927927                AssertRC(rc2);
     
    930930            if (!AudioHlpFileIsOpen(pStreamR3->Dbg.Runtime.pFileDMAMapped))
    931931            {
    932                 int rc2 = AudioHlpFileOpen(pStreamR3->Dbg.Runtime.pFileDMAMapped, PDMAUDIOFILE_DEFAULT_OPEN_FLAGS,
     932                int rc2 = AudioHlpFileOpen(pStreamR3->Dbg.Runtime.pFileDMAMapped, AUDIOHLPFILE_DEFAULT_OPEN_FLAGS,
    933933                                           &pStreamShared->State.Cfg.Props);
    934934                AssertRC(rc2);
  • trunk/src/VBox/Devices/Audio/DevHdaStream.h

    r88307 r88357  
    6161     *  For input streams, this dumps data being written to the device FIFO,
    6262     *  whereas for output streams this dumps data being read from the device FIFO. */
    63     R3PTRTYPE(PPDMAUDIOFILE) pFileStream;
     63    R3PTRTYPE(PAUDIOHLPFILE) pFileStream;
    6464    /** File for dumping raw DMA reads / writes.
    6565     *  For input streams, this dumps data being written to the device DMA,
    6666     *  whereas for output streams this dumps data being read from the device DMA. */
    67     R3PTRTYPE(PPDMAUDIOFILE) pFileDMARaw;
     67    R3PTRTYPE(PAUDIOHLPFILE) pFileDMARaw;
    6868    /** File for dumping mapped (that is, extracted) DMA reads / writes. */
    69     R3PTRTYPE(PPDMAUDIOFILE) pFileDMAMapped;
     69    R3PTRTYPE(PAUDIOHLPFILE) pFileDMAMapped;
    7070} HDASTREAMDEBUGRT;
    7171
  • trunk/src/VBox/Devices/Audio/DevIchAc97.cpp

    r88307 r88357  
    402402     *  For input streams, this dumps data being written to the device FIFO,
    403403     *  whereas for output streams this dumps data being read from the device FIFO. */
    404     R3PTRTYPE(PPDMAUDIOFILE)    pFileStream;
     404    R3PTRTYPE(PAUDIOHLPFILE)    pFileStream;
    405405    /** File for dumping DMA reads / writes.
    406406     *  For input streams, this dumps data being written to the device DMA,
    407407     *  whereas for output streams this dumps data being read from the device DMA. */
    408     R3PTRTYPE(PPDMAUDIOFILE)    pFileDMA;
     408    R3PTRTYPE(PAUDIOHLPFILE)    pFileDMA;
    409409} AC97STREAMDEBUGRT;
    410410
     
    10051005            if (!AudioHlpFileIsOpen(pStreamCC->Dbg.Runtime.pFileStream))
    10061006            {
    1007                 int rc2 = AudioHlpFileOpen(pStreamCC->Dbg.Runtime.pFileStream, PDMAUDIOFILE_DEFAULT_OPEN_FLAGS,
     1007                int rc2 = AudioHlpFileOpen(pStreamCC->Dbg.Runtime.pFileStream, AUDIOHLPFILE_DEFAULT_OPEN_FLAGS,
    10081008                                           &pStreamCC->State.Cfg.Props);
    10091009                AssertRC(rc2);
     
    10121012            if (!AudioHlpFileIsOpen(pStreamCC->Dbg.Runtime.pFileDMA))
    10131013            {
    1014                 int rc2 = AudioHlpFileOpen(pStreamCC->Dbg.Runtime.pFileDMA, PDMAUDIOFILE_DEFAULT_OPEN_FLAGS,
     1014                int rc2 = AudioHlpFileOpen(pStreamCC->Dbg.Runtime.pFileDMA, AUDIOHLPFILE_DEFAULT_OPEN_FLAGS,
    10151015                                           &pStreamCC->State.Cfg.Props);
    10161016                AssertRC(rc2);
     
    11061106        char szPath[RTPATH_MAX];
    11071107        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);
    11091109        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);
    11111111        AssertRC(rc2);
    11121112
     
    11171117
    11181118        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);
    11201120        AssertRC(rc2);
    11211121
    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);
    11231123        AssertRC(rc2);
    11241124
  • trunk/src/VBox/Devices/Audio/DrvAudio.cpp

    r88356 r88357  
    141141            {
    142142                /** File for writing stream reads. */
    143                 PPDMAUDIOFILE   pFileStreamRead;
     143                PAUDIOHLPFILE   pFileStreamRead;
    144144                /** File for writing non-interleaved captures. */
    145                 PPDMAUDIOFILE   pFileCaptureNonInterleaved;
     145                PAUDIOHLPFILE   pFileCaptureNonInterleaved;
    146146            } Dbg;
    147147            struct
     
    164164            {
    165165                /** File for writing stream writes. */
    166                 PPDMAUDIOFILE   pFileStreamWrite;
     166                PAUDIOHLPFILE   pFileStreamWrite;
    167167                /** File for writing stream playback. */
    168                 PPDMAUDIOFILE   pFilePlayNonInterleaved;
     168                PAUDIOHLPFILE   pFilePlayNonInterleaved;
    169169            } Dbg;
    170170            struct
  • trunk/src/VBox/Devices/Audio/DrvHostAudioDebug.cpp

    r88286 r88357  
    3939    PPDMAUDIOSTREAMCFG pCfg;
    4040    /** Audio file to dump output to or read input from. */
    41     PPDMAUDIOFILE      pFile;
     41    PAUDIOHLPFILE      pFile;
    4242    union
    4343    {
     
    135135    char szFile[RTPATH_MAX];
    136136    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);
    138138    if (RT_SUCCESS(rc))
    139139    {
    140         rc = AudioHlpFileCreate(PDMAUDIOFILETYPE_WAV, szFile, PDMAUDIOFILE_FLAGS_NONE, &pStreamDbg->pFile);
     140        rc = AudioHlpFileCreate(AUDIOHLPFILETYPE_WAV, szFile, AUDIOHLPFILE_FLAGS_NONE, &pStreamDbg->pFile);
    141141        if (RT_SUCCESS(rc))
    142142            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.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette