VirtualBox

Changeset 89484 in vbox for trunk/src/VBox/Devices


Ignore:
Timestamp:
Jun 3, 2021 1:00:54 PM (4 years ago)
Author:
vboxsync
Message:

DrvHostAudioNull: Cleaned up function prefix and struct names. bugref:9890

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Audio/DrvHostAudioNull.cpp

    r89258 r89484  
    3636*********************************************************************************************************************************/
    3737/** Null audio stream. */
    38 typedef struct NULLAUDIOSTREAM
     38typedef struct DRVHSTAUDNULLSTREAM
    3939{
    4040    /** Common part. */
     
    4242    /** The stream's acquired configuration. */
    4343    PDMAUDIOSTREAMCFG       Cfg;
    44 } NULLAUDIOSTREAM;
     44} DRVHSTAUDNULLSTREAM;
    4545/** Pointer to a null audio stream.   */
    46 typedef NULLAUDIOSTREAM *PNULLAUDIOSTREAM;
     46typedef DRVHSTAUDNULLSTREAM *PDRVHSTAUDNULLSTREAM;
    4747
    4848
     
    5151 * @interface_method_impl{PDMIHOSTAUDIO,pfnGetConfig}
    5252 */
    53 static DECLCALLBACK(int) drvHostNullAudioHA_GetConfig(PPDMIHOSTAUDIO pInterface, PPDMAUDIOBACKENDCFG pBackendCfg)
     53static DECLCALLBACK(int) drvHstAudNullHA_GetConfig(PPDMIHOSTAUDIO pInterface, PPDMAUDIOBACKENDCFG pBackendCfg)
    5454{
    5555    NOREF(pInterface);
     
    6060     */
    6161    RTStrCopy(pBackendCfg->szName, sizeof(pBackendCfg->szName), "NULL audio");
    62     pBackendCfg->cbStream       = sizeof(NULLAUDIOSTREAM);
     62    pBackendCfg->cbStream       = sizeof(DRVHSTAUDNULLSTREAM);
    6363    pBackendCfg->fFlags         = 0;
    6464    pBackendCfg->cMaxStreamsOut = 1; /* Output */
     
    7272 * @interface_method_impl{PDMIHOSTAUDIO,pfnGetStatus}
    7373 */
    74 static DECLCALLBACK(PDMAUDIOBACKENDSTS) drvHostNullAudioHA_GetStatus(PPDMIHOSTAUDIO pInterface, PDMAUDIODIR enmDir)
     74static DECLCALLBACK(PDMAUDIOBACKENDSTS) drvHstAudNullHA_GetStatus(PPDMIHOSTAUDIO pInterface, PDMAUDIODIR enmDir)
    7575{
    7676    RT_NOREF(pInterface, enmDir);
     
    8282 * @interface_method_impl{PDMIHOSTAUDIO,pfnStreamCreate}
    8383 */
    84 static DECLCALLBACK(int) drvHostNullAudioHA_StreamCreate(PPDMIHOSTAUDIO pInterface, PPDMAUDIOBACKENDSTREAM pStream,
    85                                                          PPDMAUDIOSTREAMCFG pCfgReq, PPDMAUDIOSTREAMCFG pCfgAcq)
     84static DECLCALLBACK(int) drvHstAudNullHA_StreamCreate(PPDMIHOSTAUDIO pInterface, PPDMAUDIOBACKENDSTREAM pStream,
     85                                                      PPDMAUDIOSTREAMCFG pCfgReq, PPDMAUDIOSTREAMCFG pCfgAcq)
    8686{
    8787    RT_NOREF(pInterface);
    88     PNULLAUDIOSTREAM pStreamNull = (PNULLAUDIOSTREAM)pStream;
     88    PDRVHSTAUDNULLSTREAM pStreamNull = (PDRVHSTAUDNULLSTREAM)pStream;
    8989    AssertPtrReturn(pStreamNull, VERR_INVALID_POINTER);
    9090    AssertPtrReturn(pCfgReq, VERR_INVALID_POINTER);
     
    9999 * @interface_method_impl{PDMIHOSTAUDIO,pfnStreamDestroy}
    100100 */
    101 static DECLCALLBACK(int) drvHostNullAudioHA_StreamDestroy(PPDMIHOSTAUDIO pInterface, PPDMAUDIOBACKENDSTREAM pStream,
    102                                                           bool fImmediate)
     101static DECLCALLBACK(int) drvHstAudNullHA_StreamDestroy(PPDMIHOSTAUDIO pInterface, PPDMAUDIOBACKENDSTREAM pStream, bool fImmediate)
    103102{
    104103    RT_NOREF(pInterface, pStream, fImmediate);
     
    110109 * @ interface_method_impl{PDMIHOSTAUDIO,pfnStreamEnable}
    111110 */
    112 static DECLCALLBACK(int) drvHostNullAudioHA_StreamControlStub(PPDMIHOSTAUDIO pInterface, PPDMAUDIOBACKENDSTREAM pStream)
     111static DECLCALLBACK(int) drvHstAudNullHA_StreamControlStub(PPDMIHOSTAUDIO pInterface, PPDMAUDIOBACKENDSTREAM pStream)
    113112{
    114113    RT_NOREF(pInterface, pStream);
     
    120119 * @interface_method_impl{PDMIHOSTAUDIO,pfnStreamControl}
    121120 */
    122 static DECLCALLBACK(int) drvHostNullAudioHA_StreamControl(PPDMIHOSTAUDIO pInterface,
    123                                                            PPDMAUDIOBACKENDSTREAM pStream, PDMAUDIOSTREAMCMD enmStreamCmd)
     121static DECLCALLBACK(int) drvHstAudNullHA_StreamControl(PPDMIHOSTAUDIO pInterface,
     122                                                       PPDMAUDIOBACKENDSTREAM pStream, PDMAUDIOSTREAMCMD enmStreamCmd)
    124123{
    125124    /** @todo r=bird: I'd like to get rid of this pfnStreamControl method,
     
    130129    {
    131130        case PDMAUDIOSTREAMCMD_ENABLE:
    132             return drvHostNullAudioHA_StreamControlStub(pInterface, pStream);
     131            return drvHstAudNullHA_StreamControlStub(pInterface, pStream);
    133132        case PDMAUDIOSTREAMCMD_DISABLE:
    134             return drvHostNullAudioHA_StreamControlStub(pInterface, pStream);
     133            return drvHstAudNullHA_StreamControlStub(pInterface, pStream);
    135134        case PDMAUDIOSTREAMCMD_PAUSE:
    136             return drvHostNullAudioHA_StreamControlStub(pInterface, pStream);
     135            return drvHstAudNullHA_StreamControlStub(pInterface, pStream);
    137136        case PDMAUDIOSTREAMCMD_RESUME:
    138             return drvHostNullAudioHA_StreamControlStub(pInterface, pStream);
     137            return drvHstAudNullHA_StreamControlStub(pInterface, pStream);
    139138        case PDMAUDIOSTREAMCMD_DRAIN:
    140             return drvHostNullAudioHA_StreamControlStub(pInterface, pStream);
     139            return drvHstAudNullHA_StreamControlStub(pInterface, pStream);
    141140
    142141        case PDMAUDIOSTREAMCMD_END:
     
    153152 * @interface_method_impl{PDMIHOSTAUDIO,pfnStreamGetReadable}
    154153 */
    155 static DECLCALLBACK(uint32_t) drvHostNullAudioHA_StreamGetReadable(PPDMIHOSTAUDIO pInterface, PPDMAUDIOBACKENDSTREAM pStream)
     154static DECLCALLBACK(uint32_t) drvHstAudNullHA_StreamGetReadable(PPDMIHOSTAUDIO pInterface, PPDMAUDIOBACKENDSTREAM pStream)
    156155{
    157156    RT_NOREF(pInterface, pStream);
     
    164163 * @interface_method_impl{PDMIHOSTAUDIO,pfnStreamGetWritable}
    165164 */
    166 static DECLCALLBACK(uint32_t) drvHostNullAudioHA_StreamGetWritable(PPDMIHOSTAUDIO pInterface, PPDMAUDIOBACKENDSTREAM pStream)
     165static DECLCALLBACK(uint32_t) drvHstAudNullHA_StreamGetWritable(PPDMIHOSTAUDIO pInterface, PPDMAUDIOBACKENDSTREAM pStream)
    167166{
    168167    RT_NOREF(pInterface, pStream);
     
    174173 * @interface_method_impl{PDMIHOSTAUDIO,pfnStreamGetPending}
    175174 */
    176 static DECLCALLBACK(uint32_t) drvHostNullAudioHA_StreamGetPending(PPDMIHOSTAUDIO pInterface, PPDMAUDIOBACKENDSTREAM pStream)
     175static DECLCALLBACK(uint32_t) drvHstAudNullHA_StreamGetPending(PPDMIHOSTAUDIO pInterface, PPDMAUDIOBACKENDSTREAM pStream)
    177176{
    178177    RT_NOREF(pInterface, pStream);
     
    184183 * @interface_method_impl{PDMIHOSTAUDIO,pfnStreamGetState}
    185184 */
    186 static DECLCALLBACK(PDMHOSTAUDIOSTREAMSTATE) drvHostNullAudioHA_StreamGetState(PPDMIHOSTAUDIO pInterface,
    187                                                                                PPDMAUDIOBACKENDSTREAM pStream)
     185static DECLCALLBACK(PDMHOSTAUDIOSTREAMSTATE) drvHstAudNullHA_StreamGetState(PPDMIHOSTAUDIO pInterface,
     186                                                                            PPDMAUDIOBACKENDSTREAM pStream)
    188187{
    189188    RT_NOREF(pInterface);
     
    202201 * @interface_method_impl{PDMIHOSTAUDIO,pfnStreamPlay}
    203202 */
    204 static DECLCALLBACK(int) drvHostNullAudioHA_StreamPlay(PPDMIHOSTAUDIO pInterface, PPDMAUDIOBACKENDSTREAM pStream,
    205                                                        const void *pvBuf, uint32_t cbBuf, uint32_t *pcbWritten)
     203static DECLCALLBACK(int) drvHstAudNullHA_StreamPlay(PPDMIHOSTAUDIO pInterface, PPDMAUDIOBACKENDSTREAM pStream,
     204                                                    const void *pvBuf, uint32_t cbBuf, uint32_t *pcbWritten)
    206205{
    207206    RT_NOREF(pInterface, pStream, pvBuf);
     
    216215 * @interface_method_impl{PDMIHOSTAUDIO,pfnStreamCapture}
    217216 */
    218 static DECLCALLBACK(int) drvHostNullAudioHA_StreamCapture(PPDMIHOSTAUDIO pInterface, PPDMAUDIOBACKENDSTREAM pStream,
    219                                                           void *pvBuf, uint32_t cbBuf, uint32_t *pcbRead)
     217static DECLCALLBACK(int) drvHstAudNullHA_StreamCapture(PPDMIHOSTAUDIO pInterface, PPDMAUDIOBACKENDSTREAM pStream,
     218                                                       void *pvBuf, uint32_t cbBuf, uint32_t *pcbRead)
    220219{
    221220    RT_NOREF(pInterface);
    222     PNULLAUDIOSTREAM pStreamNull = (PNULLAUDIOSTREAM)pStream;
     221    PDRVHSTAUDNULLSTREAM pStreamNull = (PDRVHSTAUDNULLSTREAM)pStream;
    223222
    224223    /** @todo rate limit this? */
     
    238237DECL_HIDDEN_CONST(PDMIHOSTAUDIO) const g_DrvHostAudioNull =
    239238{
    240     /* .pfnGetConfig                 =*/ drvHostNullAudioHA_GetConfig,
     239    /* .pfnGetConfig                 =*/ drvHstAudNullHA_GetConfig,
    241240    /* .pfnGetDevices                =*/ NULL,
    242241    /* .pfnSetDevice                 =*/ NULL,
    243     /* .pfnGetStatus                 =*/ drvHostNullAudioHA_GetStatus,
     242    /* .pfnGetStatus                 =*/ drvHstAudNullHA_GetStatus,
    244243    /* .pfnDoOnWorkerThread          =*/ NULL,
    245244    /* .pfnStreamConfigHint          =*/ NULL,
    246     /* .pfnStreamCreate              =*/ drvHostNullAudioHA_StreamCreate,
     245    /* .pfnStreamCreate              =*/ drvHstAudNullHA_StreamCreate,
    247246    /* .pfnStreamInitAsync           =*/ NULL,
    248     /* .pfnStreamDestroy             =*/ drvHostNullAudioHA_StreamDestroy,
     247    /* .pfnStreamDestroy             =*/ drvHstAudNullHA_StreamDestroy,
    249248    /* .pfnStreamNotifyDeviceChanged =*/ NULL,
    250     /* .pfnStreamControl             =*/ drvHostNullAudioHA_StreamControl,
    251     /* .pfnStreamGetReadable         =*/ drvHostNullAudioHA_StreamGetReadable,
    252     /* .pfnStreamGetWritable         =*/ drvHostNullAudioHA_StreamGetWritable,
    253     /* .pfnStreamGetPending          =*/ drvHostNullAudioHA_StreamGetPending,
    254     /* .pfnStreamGetState            =*/ drvHostNullAudioHA_StreamGetState,
    255     /* .pfnStreamPlay                =*/ drvHostNullAudioHA_StreamPlay,
    256     /* .pfnStreamCapture             =*/ drvHostNullAudioHA_StreamCapture,
     249    /* .pfnStreamControl             =*/ drvHstAudNullHA_StreamControl,
     250    /* .pfnStreamGetReadable         =*/ drvHstAudNullHA_StreamGetReadable,
     251    /* .pfnStreamGetWritable         =*/ drvHstAudNullHA_StreamGetWritable,
     252    /* .pfnStreamGetPending          =*/ drvHstAudNullHA_StreamGetPending,
     253    /* .pfnStreamGetState            =*/ drvHstAudNullHA_StreamGetState,
     254    /* .pfnStreamPlay                =*/ drvHstAudNullHA_StreamPlay,
     255    /* .pfnStreamCapture             =*/ drvHstAudNullHA_StreamCapture,
    257256};
    258257
     
    261260 * @interface_method_impl{PDMIBASE,pfnQueryInterface}
    262261 */
    263 static DECLCALLBACK(void *) drvHostNullAudioQueryInterface(PPDMIBASE pInterface, const char *pszIID)
     262static DECLCALLBACK(void *) drvHstAudNullQueryInterface(PPDMIBASE pInterface, const char *pszIID)
    264263{
    265264    PPDMDRVINS        pDrvIns = PDMIBASE_2_PDMDRV(pInterface);
     
    277276 * @copydoc FNPDMDRVCONSTRUCT
    278277 */
    279 static DECLCALLBACK(int) drvHostNullAudioConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfg, uint32_t fFlags)
     278static DECLCALLBACK(int) drvHstAudNullConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfg, uint32_t fFlags)
    280279{
    281280    PDMDRV_CHECK_VERSIONS_RETURN(pDrvIns);
     
    288287     */
    289288    /* IBase */
    290     pDrvIns->IBase.pfnQueryInterface = drvHostNullAudioQueryInterface;
     289    pDrvIns->IBase.pfnQueryInterface = drvHstAudNullQueryInterface;
    291290    /* IHostAudio */
    292291    *pThis = g_DrvHostAudioNull;
     
    320319    sizeof(PDMIHOSTAUDIO),
    321320    /* pfnConstruct */
    322     drvHostNullAudioConstruct,
     321    drvHstAudNullConstruct,
    323322    /* pfnDestruct */
    324323    NULL,
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