VirtualBox

Changeset 61167 in vbox


Ignore:
Timestamp:
May 24, 2016 3:48:51 PM (9 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
107453
Message:

Audio: Renaming.

Location:
trunk/src/VBox
Files:
15 edited

Legend:

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

    r61166 r61167  
    297297    if (pStream->enmDir == PDMAUDIODIR_IN)
    298298    {
    299         if (DrvAudioPCMPropsAreEqual(&pSink->PCMProps, &pStream->InOut.pIn->Props))
     299        if (DrvAudioHlpPCMPropsAreEqual(&pSink->PCMProps, &pStream->InOut.pIn->Props))
    300300        {
    301301#ifdef VBOX_AUDIO_MIXER_WITH_MIXBUF
     
    327327    else if (pStream->enmDir == PDMAUDIODIR_OUT)
    328328    {
    329         if (DrvAudioPCMPropsAreEqual(&pSink->PCMProps, &pStream->InOut.pOut->Props))
     329        if (DrvAudioHlpPCMPropsAreEqual(&pSink->PCMProps, &pStream->InOut.pOut->Props))
    330330        {
    331331#ifdef VBOX_AUDIO_MIXER_WITH_MIXBUF
     
    386386
    387387    LogFlowFunc(("[%s]: fFlags=0x%x (enmDir=%ld, %s, %RU8 channels, %RU32Hz)\n",
    388                  pSink->pszName, fFlags, pCfg->enmDir, DrvAudioAudFmtToStr(pCfg->enmFormat), pCfg->cChannels, pCfg->uHz));
     388                 pSink->pszName, fFlags, pCfg->enmDir, DrvAudioHlpAudFmtToStr(pCfg->enmFormat), pCfg->cChannels, pCfg->uHz));
    389389
    390390    PDMAUDIOSTREAMCFG CfgSink;
    391     int rc = DrvAudioPCMPropsToStreamCfg(&pSink->PCMProps, &CfgSink);
     391    int rc = DrvAudioHlpPCMPropsToStreamCfg(&pSink->PCMProps, &CfgSink);
    392392    AssertRCReturn(rc, rc);
    393393
     
    693693    AssertPtrReturn(pPCMProps, VERR_INVALID_POINTER);
    694694
    695     if (DrvAudioPCMPropsAreEqual(&pSink->PCMProps, pPCMProps)) /* Bail out early if PCM properties are equal. */
     695    if (DrvAudioHlpPCMPropsAreEqual(&pSink->PCMProps, pPCMProps)) /* Bail out early if PCM properties are equal. */
    696696        return VINF_SUCCESS;
    697697
  • trunk/src/VBox/Devices/Audio/DevIchAc97.cpp

    r61166 r61167  
    733733    /* Update the sink's format. */
    734734    PDMPCMPROPS PCMProps;
    735     int rc = DrvAudioStreamCfgToProps(pCfg, &PCMProps);
     735    int rc = DrvAudioHlpStreamCfgToProps(pCfg, &PCMProps);
    736736    if (RT_SUCCESS(rc))
    737737        rc = AudioMixerSinkSetFormat(pSink, &PCMProps);
     
    783783    /* Update the sink's format. */
    784784    PDMPCMPROPS PCMProps;
    785     int rc = DrvAudioStreamCfgToProps(pCfg, &PCMProps);
     785    int rc = DrvAudioHlpStreamCfgToProps(pCfg, &PCMProps);
    786786    if (RT_SUCCESS(rc))
    787787        rc = AudioMixerSinkSetFormat(pThis->pSinkOutput, &PCMProps);
  • trunk/src/VBox/Devices/Audio/DevIchHda.cpp

    r61166 r61167  
    32293229
    32303230    PDMPCMPROPS Props;
    3231     int rc = DrvAudioStreamCfgToProps(pCfg, &Props);
     3231    int rc = DrvAudioHlpStreamCfgToProps(pCfg, &Props);
    32323232    if (RT_FAILURE(rc))
    32333233        return rc;
     
    37143714    /* Update the sink's format. */
    37153715    PDMPCMPROPS PCMProps;
    3716     int rc = DrvAudioStreamCfgToProps(pCfg, &PCMProps);
     3716    int rc = DrvAudioHlpStreamCfgToProps(pCfg, &PCMProps);
    37173717    if (RT_SUCCESS(rc))
    37183718        rc = AudioMixerSinkSetFormat(pSink->pMixSink, &PCMProps);
  • trunk/src/VBox/Devices/Audio/DevSB16.cpp

    r61166 r61167  
    20302030    /* Update the sink's format. */
    20312031    PDMPCMPROPS PCMProps;
    2032     int rc = DrvAudioStreamCfgToProps(pCfg, &PCMProps);
     2032    int rc = DrvAudioHlpStreamCfgToProps(pCfg, &PCMProps);
    20332033    if (RT_SUCCESS(rc))
    20342034        rc = AudioMixerSinkSetFormat(pThis->pSinkOutput, &PCMProps);
  • trunk/src/VBox/Devices/Audio/DrvAudio.cpp

    r61166 r61167  
    8989    }
    9090
    91     PDMAUDIOFMT fmt = DrvAudioStrToAudFmt(pszValue);
     91    PDMAUDIOFMT fmt = DrvAudioHlpStrToAudFmt(pszValue);
    9292    if (fmt == PDMAUDIOFMT_INVALID)
    9393    {
     
    14721472    LogFlowFunc(("Host=%s, Guest=%s\n", pCfgHost->szName, pCfgGuest->szName));
    14731473#ifdef DEBUG
    1474     DrvAudioStreamCfgPrint(pCfgHost);
    1475     DrvAudioStreamCfgPrint(pCfgGuest);
     1474    DrvAudioHlpStreamCfgPrint(pCfgHost);
     1475    DrvAudioHlpStreamCfgPrint(pCfgGuest);
    14761476#endif
    14771477
     
    14891489    do
    14901490    {
    1491         if (   !DrvAudioStreamCfgIsValid(pCfgHost)
    1492             || !DrvAudioStreamCfgIsValid(pCfgGuest))
     1491        if (   !DrvAudioHlpStreamCfgIsValid(pCfgHost)
     1492            || !DrvAudioHlpStreamCfgIsValid(pCfgGuest))
    14931493        {
    14941494            RC_BREAK(VERR_INVALID_PARAMETER);
     
    15681568        pHstStrm->pPair    = pGstStrm;
    15691569
    1570         rc = DrvAudioStreamCfgToProps(pCfgHost, &pHstStrm->Props);
     1570        rc = DrvAudioHlpStreamCfgToProps(pCfgHost, &pHstStrm->Props);
    15711571        AssertRCBreak(rc);
    15721572
     
    15811581                    strlen(pCfgGuest->szName) ? pCfgGuest->szName : "<Untitled>");
    15821582
    1583         rc = DrvAudioStreamCfgToProps(pCfgGuest, &pGstStrm->Props);
     1583        rc = DrvAudioHlpStreamCfgToProps(pCfgGuest, &pGstStrm->Props);
    15841584        AssertRCBreak(rc);
    15851585
  • trunk/src/VBox/Devices/Audio/DrvAudio.h

    r61166 r61167  
    112112
    113113
    114 bool DrvAudioAudFmtIsSigned(PDMAUDIOFMT enmFmt);
    115 uint8_t DrvAudioAudFmtToBits(PDMAUDIOFMT enmFmt);
    116 const char *DrvAudioAudFmtToStr(PDMAUDIOFMT enmFmt);
    117 void DrvAudioClearBuf(PPDMPCMPROPS pPCMInfo, void *pvBuf, size_t cbBuf, uint32_t cSamples);
    118 bool DrvAudioPCMPropsAreEqual(PPDMPCMPROPS pPCMProps1, PPDMPCMPROPS pPCMProps2);
    119 bool DrvAudioPCMPropsAreEqual(PPDMPCMPROPS pPCMProps, PPDMAUDIOSTREAMCFG pCfg);
    120 int DrvAudioPCMPropsToStreamCfg(PPDMPCMPROPS pPCMProps, PPDMAUDIOSTREAMCFG pCfg);
    121 const char *DrvAudRecSrcToStr(PDMAUDIORECSOURCE enmRecSource);
    122 void DrvAudioStreamCfgPrint(PPDMAUDIOSTREAMCFG pCfg);
    123 bool DrvAudioStreamCfgIsValid(PPDMAUDIOSTREAMCFG pCfg);
    124 int DrvAudioStreamCfgToProps(PPDMAUDIOSTREAMCFG pCfg, PPDMPCMPROPS pProps);
    125 PDMAUDIOFMT DrvAudioStrToAudFmt(const char *pszFmt);
     114bool DrvAudioHlpAudFmtIsSigned(PDMAUDIOFMT enmFmt);
     115uint8_t DrvAudioHlpAudFmtToBits(PDMAUDIOFMT enmFmt);
     116const char *DrvAudioHlpAudFmtToStr(PDMAUDIOFMT enmFmt);
     117void DrvAudioHlpClearBuf(PPDMPCMPROPS pPCMInfo, void *pvBuf, size_t cbBuf, uint32_t cSamples);
     118bool DrvAudioHlpPCMPropsAreEqual(PPDMPCMPROPS pPCMProps1, PPDMPCMPROPS pPCMProps2);
     119bool DrvAudioHlpPCMPropsAreEqual(PPDMPCMPROPS pPCMProps, PPDMAUDIOSTREAMCFG pCfg);
     120int DrvAudioHlpPCMPropsToStreamCfg(PPDMPCMPROPS pPCMProps, PPDMAUDIOSTREAMCFG pCfg);
     121const char *DrvAudHlpRecSrcToStr(PDMAUDIORECSOURCE enmRecSource);
     122void DrvAudioHlpStreamCfgPrint(PPDMAUDIOSTREAMCFG pCfg);
     123bool DrvAudioHlpStreamCfgIsValid(PPDMAUDIOSTREAMCFG pCfg);
     124int DrvAudioHlpStreamCfgToProps(PPDMAUDIOSTREAMCFG pCfg, PPDMPCMPROPS pProps);
     125PDMAUDIOFMT DrvAudioHlpStrToAudFmt(const char *pszFmt);
    126126
    127127#endif /* DRV_AUDIO_H */
  • trunk/src/VBox/Devices/Audio/DrvAudioCommon.cpp

    r61166 r61167  
    106106 * @param   cSamples                Number of audio samples to clear in the buffer.
    107107 */
    108 void DrvAudioClearBuf(PPDMPCMPROPS pPCMProps, void *pvBuf, size_t cbBuf, uint32_t cSamples)
     108void DrvAudioHlpClearBuf(PPDMPCMPROPS pPCMProps, void *pvBuf, size_t cbBuf, uint32_t cSamples)
    109109{
    110110    AssertPtrReturnVoid(pPCMProps);
     
    170170}
    171171
    172 const char *DrvAudRecSrcToStr(PDMAUDIORECSOURCE enmRecSrc)
     172const char *DrvAudHlpRecSrcToStr(PDMAUDIORECSOURCE enmRecSrc)
    173173{
    174174    switch (enmRecSrc)
     
    195195 * @param   enmFmt              Audio format to retrieve value for.
    196196 */
    197 bool DrvAudioAudFmtIsSigned(PDMAUDIOFMT enmFmt)
     197bool DrvAudioHlpAudFmtIsSigned(PDMAUDIOFMT enmFmt)
    198198{
    199199    switch (enmFmt)
     
    224224 * @param   enmFmt              Audio format to retrieve value for.
    225225 */
    226 uint8_t DrvAudioAudFmtToBits(PDMAUDIOFMT enmFmt)
     226uint8_t DrvAudioHlpAudFmtToBits(PDMAUDIOFMT enmFmt)
    227227{
    228228    switch (enmFmt)
     
    248248}
    249249
    250 const char *DrvAudioAudFmtToStr(PDMAUDIOFMT enmFmt)
     250const char *DrvAudioHlpAudFmtToStr(PDMAUDIOFMT enmFmt)
    251251{
    252252    switch (enmFmt)
     
    278278}
    279279
    280 PDMAUDIOFMT DrvAudioStrToAudFmt(const char *pszFmt)
     280PDMAUDIOFMT DrvAudioHlpStrToAudFmt(const char *pszFmt)
    281281{
    282282    AssertPtrReturn(pszFmt, PDMAUDIOFMT_INVALID);
     
    299299}
    300300
    301 bool DrvAudioPCMPropsAreEqual(PPDMPCMPROPS pProps, PPDMAUDIOSTREAMCFG pCfg)
     301bool DrvAudioHlpPCMPropsAreEqual(PPDMPCMPROPS pProps, PPDMAUDIOSTREAMCFG pCfg)
    302302{
    303303    AssertPtrReturn(pProps, false);
     
    339339}
    340340
    341 bool DrvAudioPCMPropsAreEqual(PPDMPCMPROPS pProps1, PPDMPCMPROPS pProps2)
     341bool DrvAudioHlpPCMPropsAreEqual(PPDMPCMPROPS pProps1, PPDMPCMPROPS pProps2)
    342342{
    343343    AssertPtrReturn(pProps1, false);
     
    358358 * @param   pCfg                Pointer to audio stream configuration to store result into.
    359359 */
    360 int DrvAudioPCMPropsToStreamCfg(PPDMPCMPROPS pPCMProps, PPDMAUDIOSTREAMCFG pCfg)
     360int DrvAudioHlpPCMPropsToStreamCfg(PPDMPCMPROPS pPCMProps, PPDMAUDIOSTREAMCFG pCfg)
    361361{
    362362    AssertPtrReturn(pPCMProps, VERR_INVALID_POINTER);
     
    372372}
    373373
    374 bool DrvAudioStreamCfgIsValid(PPDMAUDIOSTREAMCFG pCfg)
     374bool DrvAudioHlpStreamCfgIsValid(PPDMAUDIOSTREAMCFG pCfg)
    375375{
    376376    bool fValid = (   pCfg->cChannels == 1
     
    413413 * @param   pProps                  PCM properties to save result to.
    414414 */
    415 int DrvAudioStreamCfgToProps(PPDMAUDIOSTREAMCFG pCfg, PPDMPCMPROPS pProps)
     415int DrvAudioHlpStreamCfgToProps(PPDMAUDIOSTREAMCFG pCfg, PPDMPCMPROPS pProps)
    416416{
    417417    AssertPtrReturn(pCfg,   VERR_INVALID_POINTER);
     
    465465}
    466466
    467 void DrvAudioStreamCfgPrint(PPDMAUDIOSTREAMCFG pCfg)
     467void DrvAudioHlpStreamCfgPrint(PPDMAUDIOSTREAMCFG pCfg)
    468468{
    469469    AssertPtrReturnVoid(pCfg);
  • trunk/src/VBox/Devices/Audio/DrvHostALSAAudio.cpp

    r61157 r61167  
    11291129        streamCfg.enmEndianness = enmEnd;
    11301130
    1131         rc = DrvAudioStreamCfgToProps(&streamCfg, &pStream->Props);
     1131        rc = DrvAudioHlpStreamCfgToProps(&streamCfg, &pStream->Props);
    11321132        if (RT_FAILURE(rc))
    11331133            break;
     
    11981198        streamCfg.enmEndianness = enmEnd;
    11991199
    1200         rc = DrvAudioStreamCfgToProps(&streamCfg, &pStream->Props);
     1200        rc = DrvAudioHlpStreamCfgToProps(&streamCfg, &pStream->Props);
    12011201        if (RT_FAILURE(rc))
    12021202            break;
  • trunk/src/VBox/Devices/Audio/DrvHostCoreAudio.cpp

    r61164 r61167  
    19881988
    19891989    /* Initialize the hardware info section with the audio settings */
    1990     int rc = DrvAudioStreamCfgToProps(pCfg, &pStreamIn->Stream.Props);
     1990    int rc = DrvAudioHlpStreamCfgToProps(pCfg, &pStreamIn->Stream.Props);
    19911991    if (RT_SUCCESS(rc))
    19921992    {
     
    20462046
    20472047    /* Initialize the hardware info section with the audio settings */
    2048     int rc = DrvAudioStreamCfgToProps(pCfg, &pStreamOut->Stream.Props);
     2048    int rc = DrvAudioHlpStreamCfgToProps(pCfg, &pStreamOut->Stream.Props);
    20492049    if (RT_SUCCESS(rc))
    20502050    {
  • trunk/src/VBox/Devices/Audio/DrvHostDSound.cpp

    r61157 r61167  
    759759
    760760        if (pv1 && len1)
    761             DrvAudioClearBuf(&pDSoundStream->Stream.Props, pv1, cb1, len1);
     761            DrvAudioHlpClearBuf(&pDSoundStream->Stream.Props, pv1, cb1, len1);
    762762
    763763        if (pv2 && len2)
    764             DrvAudioClearBuf(&pDSoundStream->Stream.Props, pv2, cb2, len2);
     764            DrvAudioHlpClearBuf(&pDSoundStream->Stream.Props, pv2, cb2, len2);
    765765
    766766        directSoundPlayUnlock(pThis, pDSoundStream->pDSB, pv1, pv2, cb1, cb2);
     
    920920        {
    921921            DSLOG(("DSound: Guest \"%s\" is using host \"%s\"\n",
    922                    DrvAudRecSrcToStr(pDSoundStream->enmRecSource), pDev->pszName));
     922                   DrvAudHlpRecSrcToStr(pDSoundStream->enmRecSource), pDev->pszName));
    923923
    924924            pGUID = &pDev->Guid;
     
    929929    /* This always has to be in the release log. */
    930930    LogRel(("DSound: Guest \"%s\" is using host device with GUID: %s\n",
    931             DrvAudRecSrcToStr(pDSoundStream->enmRecSource), pszGUID? pszGUID: "{?}"));
     931            DrvAudHlpRecSrcToStr(pDSoundStream->enmRecSource), pszGUID? pszGUID: "{?}"));
    932932    RTStrFree(pszGUID);
    933933
     
    14251425    pDSoundStream->streamCfg.enmEndianness = PDMAUDIOHOSTENDIANNESS;
    14261426
    1427     int rc = DrvAudioStreamCfgToProps(&pDSoundStream->streamCfg, &pDSoundStream->Stream.Props);
     1427    int rc = DrvAudioHlpStreamCfgToProps(&pDSoundStream->streamCfg, &pDSoundStream->Stream.Props);
    14281428    if (RT_SUCCESS(rc))
    14291429    {
     
    16861686
    16871687    /** @todo caller should already init Props? */
    1688     int rc = DrvAudioStreamCfgToProps(&pDSoundStream->streamCfg, &pStream->Props);
     1688    int rc = DrvAudioHlpStreamCfgToProps(&pDSoundStream->streamCfg, &pStream->Props);
    16891689    if (RT_SUCCESS(rc))
    16901690    {
  • trunk/src/VBox/Devices/Audio/DrvHostNullAudio.cpp

    r61163 r61167  
    115115
    116116    /* Just adopt the wanted stream configuration. */
    117     int rc = DrvAudioStreamCfgToProps(pCfg, &pStream->Props);
     117    int rc = DrvAudioHlpStreamCfgToProps(pCfg, &pStream->Props);
    118118    if (RT_SUCCESS(rc))
    119119    {
     
    133133
    134134    /* Just adopt the wanted stream configuration. */
    135     int rc = DrvAudioStreamCfgToProps(pCfg, &pStream->Props);
     135    int rc = DrvAudioHlpStreamCfgToProps(pCfg, &pStream->Props);
    136136    if (RT_SUCCESS(rc))
    137137    {
  • trunk/src/VBox/Devices/Audio/DrvHostOSSAudio.cpp

    r61157 r61167  
    368368        case PDMAUDIOSTREAMCMD_RESUME:
    369369        {
    370             DrvAudioClearBuf(&pStream->Props,
     370            DrvAudioHlpClearBuf(&pStream->Props,
    371371                             pThisStream->pvBuf, pThisStream->cbBuf, AudioMixBufSize(&pStream->MixBuf));
    372372
     
    684684            streamCfg.enmEndianness = obtStream.enmENDIANNESS;
    685685
    686             rc = DrvAudioStreamCfgToProps(&streamCfg, &pStream->Props);
     686            rc = DrvAudioHlpStreamCfgToProps(&streamCfg, &pStream->Props);
    687687            if (RT_SUCCESS(rc))
    688688            {
     
    764764            streamCfg.enmEndianness = obtStream.enmENDIANNESS;
    765765
    766             rc = DrvAudioStreamCfgToProps(&streamCfg, &pStream->Props);
     766            rc = DrvAudioHlpStreamCfgToProps(&streamCfg, &pStream->Props);
    767767            if (RT_SUCCESS(rc))
    768768                cSamples = (obtStream.cFragments * obtStream.cbFragmentSize)
  • trunk/src/VBox/Devices/Audio/DrvHostPulseAudio.cpp

    r61157 r61167  
    652652    streamCfg.cChannels = pStrm->SampleSpec.channels;
    653653
    654     rc = DrvAudioStreamCfgToProps(&streamCfg, &pStream->Props);
     654    rc = DrvAudioHlpStreamCfgToProps(&streamCfg, &pStream->Props);
    655655    if (RT_SUCCESS(rc))
    656656    {
     
    722722    streamCfg.cChannels = pStrm->SampleSpec.channels;
    723723
    724     rc = DrvAudioStreamCfgToProps(&streamCfg, &pStream->Props);
     724    rc = DrvAudioHlpStreamCfgToProps(&streamCfg, &pStream->Props);
    725725    if (RT_SUCCESS(rc))
    726726    {
  • trunk/src/VBox/Devices/Audio/testcase/tstAudioMixBuffer.cpp

    r60925 r61167  
    5353    PDMPCMPROPS props;
    5454
    55     int rc = DrvAudioStreamCfgToProps(&config, &props);
     55    int rc = DrvAudioHlpStreamCfgToProps(&config, &props);
    5656    AssertRC(rc);
    5757
     
    155155    PDMPCMPROPS props;
    156156
    157     int rc = DrvAudioStreamCfgToProps(&cfg_p, &props);
     157    int rc = DrvAudioHlpStreamCfgToProps(&cfg_p, &props);
    158158    AssertRC(rc);
    159159
     
    172172    };
    173173
    174     rc = DrvAudioStreamCfgToProps(&cfg_c1, &props);
     174    rc = DrvAudioHlpStreamCfgToProps(&cfg_c1, &props);
    175175    AssertRC(rc);
    176176
     
    190190    };
    191191
    192     rc = DrvAudioStreamCfgToProps(&cfg_c2, &props);
     192    rc = DrvAudioHlpStreamCfgToProps(&cfg_c2, &props);
    193193    AssertRC(rc);
    194194
     
    275275    };
    276276
    277     int rc = DrvAudioStreamCfgToProps(&cfg_p, &props);
     277    int rc = DrvAudioHlpStreamCfgToProps(&cfg_p, &props);
    278278    AssertRC(rc);
    279279
     
    299299    };
    300300
    301     rc = DrvAudioStreamCfgToProps(&cfg_c, &props);
     301    rc = DrvAudioHlpStreamCfgToProps(&cfg_c, &props);
    302302    AssertRC(rc);
    303303
     
    385385    };
    386386
    387     int rc = DrvAudioStreamCfgToProps(&cfg_p, &props);
     387    int rc = DrvAudioHlpStreamCfgToProps(&cfg_p, &props);
    388388    AssertRC(rc);
    389389
     
    402402    };
    403403
    404     rc = DrvAudioStreamCfgToProps(&cfg_c, &props);
     404    rc = DrvAudioHlpStreamCfgToProps(&cfg_c, &props);
    405405    AssertRC(rc);
    406406
     
    489489    };
    490490
    491     int rc = DrvAudioStreamCfgToProps(&cfg, &props);
     491    int rc = DrvAudioHlpStreamCfgToProps(&cfg, &props);
    492492    AssertRC(rc);
    493493
  • trunk/src/VBox/Main/src-client/DrvAudioVRDE.cpp

    r61157 r61167  
    9797        *pcSamples = _4K; /** @todo Make this configurable. */
    9898
    99     return DrvAudioStreamCfgToProps(pCfg, &pVRDEStrmIn->Stream.Props);
     99    return DrvAudioHlpStreamCfgToProps(pCfg, &pVRDEStrmIn->Stream.Props);
    100100}
    101101
     
    114114        *pcSamples = _4K; /** @todo Make this configurable. */
    115115
    116     return DrvAudioStreamCfgToProps(pCfg, &pVRDEStrmOut->Stream.Props);
     116    return DrvAudioHlpStreamCfgToProps(pCfg, &pVRDEStrmOut->Stream.Props);
    117117}
    118118
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