Changeset 61167 in vbox
- Timestamp:
- May 24, 2016 3:48:51 PM (9 years ago)
- svn:sync-xref-src-repo-rev:
- 107453
- Location:
- trunk/src/VBox
- Files:
-
- 15 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Audio/AudioMixer.cpp
r61166 r61167 297 297 if (pStream->enmDir == PDMAUDIODIR_IN) 298 298 { 299 if (DrvAudio PCMPropsAreEqual(&pSink->PCMProps, &pStream->InOut.pIn->Props))299 if (DrvAudioHlpPCMPropsAreEqual(&pSink->PCMProps, &pStream->InOut.pIn->Props)) 300 300 { 301 301 #ifdef VBOX_AUDIO_MIXER_WITH_MIXBUF … … 327 327 else if (pStream->enmDir == PDMAUDIODIR_OUT) 328 328 { 329 if (DrvAudio PCMPropsAreEqual(&pSink->PCMProps, &pStream->InOut.pOut->Props))329 if (DrvAudioHlpPCMPropsAreEqual(&pSink->PCMProps, &pStream->InOut.pOut->Props)) 330 330 { 331 331 #ifdef VBOX_AUDIO_MIXER_WITH_MIXBUF … … 386 386 387 387 LogFlowFunc(("[%s]: fFlags=0x%x (enmDir=%ld, %s, %RU8 channels, %RU32Hz)\n", 388 pSink->pszName, fFlags, pCfg->enmDir, DrvAudio AudFmtToStr(pCfg->enmFormat), pCfg->cChannels, pCfg->uHz));388 pSink->pszName, fFlags, pCfg->enmDir, DrvAudioHlpAudFmtToStr(pCfg->enmFormat), pCfg->cChannels, pCfg->uHz)); 389 389 390 390 PDMAUDIOSTREAMCFG CfgSink; 391 int rc = DrvAudio PCMPropsToStreamCfg(&pSink->PCMProps, &CfgSink);391 int rc = DrvAudioHlpPCMPropsToStreamCfg(&pSink->PCMProps, &CfgSink); 392 392 AssertRCReturn(rc, rc); 393 393 … … 693 693 AssertPtrReturn(pPCMProps, VERR_INVALID_POINTER); 694 694 695 if (DrvAudio PCMPropsAreEqual(&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. */ 696 696 return VINF_SUCCESS; 697 697 -
trunk/src/VBox/Devices/Audio/DevIchAc97.cpp
r61166 r61167 733 733 /* Update the sink's format. */ 734 734 PDMPCMPROPS PCMProps; 735 int rc = DrvAudio StreamCfgToProps(pCfg, &PCMProps);735 int rc = DrvAudioHlpStreamCfgToProps(pCfg, &PCMProps); 736 736 if (RT_SUCCESS(rc)) 737 737 rc = AudioMixerSinkSetFormat(pSink, &PCMProps); … … 783 783 /* Update the sink's format. */ 784 784 PDMPCMPROPS PCMProps; 785 int rc = DrvAudio StreamCfgToProps(pCfg, &PCMProps);785 int rc = DrvAudioHlpStreamCfgToProps(pCfg, &PCMProps); 786 786 if (RT_SUCCESS(rc)) 787 787 rc = AudioMixerSinkSetFormat(pThis->pSinkOutput, &PCMProps); -
trunk/src/VBox/Devices/Audio/DevIchHda.cpp
r61166 r61167 3229 3229 3230 3230 PDMPCMPROPS Props; 3231 int rc = DrvAudio StreamCfgToProps(pCfg, &Props);3231 int rc = DrvAudioHlpStreamCfgToProps(pCfg, &Props); 3232 3232 if (RT_FAILURE(rc)) 3233 3233 return rc; … … 3714 3714 /* Update the sink's format. */ 3715 3715 PDMPCMPROPS PCMProps; 3716 int rc = DrvAudio StreamCfgToProps(pCfg, &PCMProps);3716 int rc = DrvAudioHlpStreamCfgToProps(pCfg, &PCMProps); 3717 3717 if (RT_SUCCESS(rc)) 3718 3718 rc = AudioMixerSinkSetFormat(pSink->pMixSink, &PCMProps); -
trunk/src/VBox/Devices/Audio/DevSB16.cpp
r61166 r61167 2030 2030 /* Update the sink's format. */ 2031 2031 PDMPCMPROPS PCMProps; 2032 int rc = DrvAudio StreamCfgToProps(pCfg, &PCMProps);2032 int rc = DrvAudioHlpStreamCfgToProps(pCfg, &PCMProps); 2033 2033 if (RT_SUCCESS(rc)) 2034 2034 rc = AudioMixerSinkSetFormat(pThis->pSinkOutput, &PCMProps); -
trunk/src/VBox/Devices/Audio/DrvAudio.cpp
r61166 r61167 89 89 } 90 90 91 PDMAUDIOFMT fmt = DrvAudio StrToAudFmt(pszValue);91 PDMAUDIOFMT fmt = DrvAudioHlpStrToAudFmt(pszValue); 92 92 if (fmt == PDMAUDIOFMT_INVALID) 93 93 { … … 1472 1472 LogFlowFunc(("Host=%s, Guest=%s\n", pCfgHost->szName, pCfgGuest->szName)); 1473 1473 #ifdef DEBUG 1474 DrvAudio StreamCfgPrint(pCfgHost);1475 DrvAudio StreamCfgPrint(pCfgGuest);1474 DrvAudioHlpStreamCfgPrint(pCfgHost); 1475 DrvAudioHlpStreamCfgPrint(pCfgGuest); 1476 1476 #endif 1477 1477 … … 1489 1489 do 1490 1490 { 1491 if ( !DrvAudio StreamCfgIsValid(pCfgHost)1492 || !DrvAudio StreamCfgIsValid(pCfgGuest))1491 if ( !DrvAudioHlpStreamCfgIsValid(pCfgHost) 1492 || !DrvAudioHlpStreamCfgIsValid(pCfgGuest)) 1493 1493 { 1494 1494 RC_BREAK(VERR_INVALID_PARAMETER); … … 1568 1568 pHstStrm->pPair = pGstStrm; 1569 1569 1570 rc = DrvAudio StreamCfgToProps(pCfgHost, &pHstStrm->Props);1570 rc = DrvAudioHlpStreamCfgToProps(pCfgHost, &pHstStrm->Props); 1571 1571 AssertRCBreak(rc); 1572 1572 … … 1581 1581 strlen(pCfgGuest->szName) ? pCfgGuest->szName : "<Untitled>"); 1582 1582 1583 rc = DrvAudio StreamCfgToProps(pCfgGuest, &pGstStrm->Props);1583 rc = DrvAudioHlpStreamCfgToProps(pCfgGuest, &pGstStrm->Props); 1584 1584 AssertRCBreak(rc); 1585 1585 -
trunk/src/VBox/Devices/Audio/DrvAudio.h
r61166 r61167 112 112 113 113 114 bool DrvAudio AudFmtIsSigned(PDMAUDIOFMT enmFmt);115 uint8_t DrvAudio AudFmtToBits(PDMAUDIOFMT enmFmt);116 const char *DrvAudio AudFmtToStr(PDMAUDIOFMT enmFmt);117 void DrvAudio ClearBuf(PPDMPCMPROPS pPCMInfo, void *pvBuf, size_t cbBuf, uint32_t cSamples);118 bool DrvAudio PCMPropsAreEqual(PPDMPCMPROPS pPCMProps1, PPDMPCMPROPS pPCMProps2);119 bool DrvAudio PCMPropsAreEqual(PPDMPCMPROPS pPCMProps, PPDMAUDIOSTREAMCFG pCfg);120 int DrvAudio PCMPropsToStreamCfg(PPDMPCMPROPS pPCMProps, PPDMAUDIOSTREAMCFG pCfg);121 const char *DrvAud RecSrcToStr(PDMAUDIORECSOURCE enmRecSource);122 void DrvAudio StreamCfgPrint(PPDMAUDIOSTREAMCFG pCfg);123 bool DrvAudio StreamCfgIsValid(PPDMAUDIOSTREAMCFG pCfg);124 int DrvAudio StreamCfgToProps(PPDMAUDIOSTREAMCFG pCfg, PPDMPCMPROPS pProps);125 PDMAUDIOFMT DrvAudio StrToAudFmt(const char *pszFmt);114 bool DrvAudioHlpAudFmtIsSigned(PDMAUDIOFMT enmFmt); 115 uint8_t DrvAudioHlpAudFmtToBits(PDMAUDIOFMT enmFmt); 116 const char *DrvAudioHlpAudFmtToStr(PDMAUDIOFMT enmFmt); 117 void DrvAudioHlpClearBuf(PPDMPCMPROPS pPCMInfo, void *pvBuf, size_t cbBuf, uint32_t cSamples); 118 bool DrvAudioHlpPCMPropsAreEqual(PPDMPCMPROPS pPCMProps1, PPDMPCMPROPS pPCMProps2); 119 bool DrvAudioHlpPCMPropsAreEqual(PPDMPCMPROPS pPCMProps, PPDMAUDIOSTREAMCFG pCfg); 120 int DrvAudioHlpPCMPropsToStreamCfg(PPDMPCMPROPS pPCMProps, PPDMAUDIOSTREAMCFG pCfg); 121 const char *DrvAudHlpRecSrcToStr(PDMAUDIORECSOURCE enmRecSource); 122 void DrvAudioHlpStreamCfgPrint(PPDMAUDIOSTREAMCFG pCfg); 123 bool DrvAudioHlpStreamCfgIsValid(PPDMAUDIOSTREAMCFG pCfg); 124 int DrvAudioHlpStreamCfgToProps(PPDMAUDIOSTREAMCFG pCfg, PPDMPCMPROPS pProps); 125 PDMAUDIOFMT DrvAudioHlpStrToAudFmt(const char *pszFmt); 126 126 127 127 #endif /* DRV_AUDIO_H */ -
trunk/src/VBox/Devices/Audio/DrvAudioCommon.cpp
r61166 r61167 106 106 * @param cSamples Number of audio samples to clear in the buffer. 107 107 */ 108 void DrvAudio ClearBuf(PPDMPCMPROPS pPCMProps, void *pvBuf, size_t cbBuf, uint32_t cSamples)108 void DrvAudioHlpClearBuf(PPDMPCMPROPS pPCMProps, void *pvBuf, size_t cbBuf, uint32_t cSamples) 109 109 { 110 110 AssertPtrReturnVoid(pPCMProps); … … 170 170 } 171 171 172 const char *DrvAud RecSrcToStr(PDMAUDIORECSOURCE enmRecSrc)172 const char *DrvAudHlpRecSrcToStr(PDMAUDIORECSOURCE enmRecSrc) 173 173 { 174 174 switch (enmRecSrc) … … 195 195 * @param enmFmt Audio format to retrieve value for. 196 196 */ 197 bool DrvAudio AudFmtIsSigned(PDMAUDIOFMT enmFmt)197 bool DrvAudioHlpAudFmtIsSigned(PDMAUDIOFMT enmFmt) 198 198 { 199 199 switch (enmFmt) … … 224 224 * @param enmFmt Audio format to retrieve value for. 225 225 */ 226 uint8_t DrvAudio AudFmtToBits(PDMAUDIOFMT enmFmt)226 uint8_t DrvAudioHlpAudFmtToBits(PDMAUDIOFMT enmFmt) 227 227 { 228 228 switch (enmFmt) … … 248 248 } 249 249 250 const char *DrvAudio AudFmtToStr(PDMAUDIOFMT enmFmt)250 const char *DrvAudioHlpAudFmtToStr(PDMAUDIOFMT enmFmt) 251 251 { 252 252 switch (enmFmt) … … 278 278 } 279 279 280 PDMAUDIOFMT DrvAudio StrToAudFmt(const char *pszFmt)280 PDMAUDIOFMT DrvAudioHlpStrToAudFmt(const char *pszFmt) 281 281 { 282 282 AssertPtrReturn(pszFmt, PDMAUDIOFMT_INVALID); … … 299 299 } 300 300 301 bool DrvAudio PCMPropsAreEqual(PPDMPCMPROPS pProps, PPDMAUDIOSTREAMCFG pCfg)301 bool DrvAudioHlpPCMPropsAreEqual(PPDMPCMPROPS pProps, PPDMAUDIOSTREAMCFG pCfg) 302 302 { 303 303 AssertPtrReturn(pProps, false); … … 339 339 } 340 340 341 bool DrvAudio PCMPropsAreEqual(PPDMPCMPROPS pProps1, PPDMPCMPROPS pProps2)341 bool DrvAudioHlpPCMPropsAreEqual(PPDMPCMPROPS pProps1, PPDMPCMPROPS pProps2) 342 342 { 343 343 AssertPtrReturn(pProps1, false); … … 358 358 * @param pCfg Pointer to audio stream configuration to store result into. 359 359 */ 360 int DrvAudio PCMPropsToStreamCfg(PPDMPCMPROPS pPCMProps, PPDMAUDIOSTREAMCFG pCfg)360 int DrvAudioHlpPCMPropsToStreamCfg(PPDMPCMPROPS pPCMProps, PPDMAUDIOSTREAMCFG pCfg) 361 361 { 362 362 AssertPtrReturn(pPCMProps, VERR_INVALID_POINTER); … … 372 372 } 373 373 374 bool DrvAudio StreamCfgIsValid(PPDMAUDIOSTREAMCFG pCfg)374 bool DrvAudioHlpStreamCfgIsValid(PPDMAUDIOSTREAMCFG pCfg) 375 375 { 376 376 bool fValid = ( pCfg->cChannels == 1 … … 413 413 * @param pProps PCM properties to save result to. 414 414 */ 415 int DrvAudio StreamCfgToProps(PPDMAUDIOSTREAMCFG pCfg, PPDMPCMPROPS pProps)415 int DrvAudioHlpStreamCfgToProps(PPDMAUDIOSTREAMCFG pCfg, PPDMPCMPROPS pProps) 416 416 { 417 417 AssertPtrReturn(pCfg, VERR_INVALID_POINTER); … … 465 465 } 466 466 467 void DrvAudio StreamCfgPrint(PPDMAUDIOSTREAMCFG pCfg)467 void DrvAudioHlpStreamCfgPrint(PPDMAUDIOSTREAMCFG pCfg) 468 468 { 469 469 AssertPtrReturnVoid(pCfg); -
trunk/src/VBox/Devices/Audio/DrvHostALSAAudio.cpp
r61157 r61167 1129 1129 streamCfg.enmEndianness = enmEnd; 1130 1130 1131 rc = DrvAudio StreamCfgToProps(&streamCfg, &pStream->Props);1131 rc = DrvAudioHlpStreamCfgToProps(&streamCfg, &pStream->Props); 1132 1132 if (RT_FAILURE(rc)) 1133 1133 break; … … 1198 1198 streamCfg.enmEndianness = enmEnd; 1199 1199 1200 rc = DrvAudio StreamCfgToProps(&streamCfg, &pStream->Props);1200 rc = DrvAudioHlpStreamCfgToProps(&streamCfg, &pStream->Props); 1201 1201 if (RT_FAILURE(rc)) 1202 1202 break; -
trunk/src/VBox/Devices/Audio/DrvHostCoreAudio.cpp
r61164 r61167 1988 1988 1989 1989 /* Initialize the hardware info section with the audio settings */ 1990 int rc = DrvAudio StreamCfgToProps(pCfg, &pStreamIn->Stream.Props);1990 int rc = DrvAudioHlpStreamCfgToProps(pCfg, &pStreamIn->Stream.Props); 1991 1991 if (RT_SUCCESS(rc)) 1992 1992 { … … 2046 2046 2047 2047 /* Initialize the hardware info section with the audio settings */ 2048 int rc = DrvAudio StreamCfgToProps(pCfg, &pStreamOut->Stream.Props);2048 int rc = DrvAudioHlpStreamCfgToProps(pCfg, &pStreamOut->Stream.Props); 2049 2049 if (RT_SUCCESS(rc)) 2050 2050 { -
trunk/src/VBox/Devices/Audio/DrvHostDSound.cpp
r61157 r61167 759 759 760 760 if (pv1 && len1) 761 DrvAudio ClearBuf(&pDSoundStream->Stream.Props, pv1, cb1, len1);761 DrvAudioHlpClearBuf(&pDSoundStream->Stream.Props, pv1, cb1, len1); 762 762 763 763 if (pv2 && len2) 764 DrvAudio ClearBuf(&pDSoundStream->Stream.Props, pv2, cb2, len2);764 DrvAudioHlpClearBuf(&pDSoundStream->Stream.Props, pv2, cb2, len2); 765 765 766 766 directSoundPlayUnlock(pThis, pDSoundStream->pDSB, pv1, pv2, cb1, cb2); … … 920 920 { 921 921 DSLOG(("DSound: Guest \"%s\" is using host \"%s\"\n", 922 DrvAud RecSrcToStr(pDSoundStream->enmRecSource), pDev->pszName));922 DrvAudHlpRecSrcToStr(pDSoundStream->enmRecSource), pDev->pszName)); 923 923 924 924 pGUID = &pDev->Guid; … … 929 929 /* This always has to be in the release log. */ 930 930 LogRel(("DSound: Guest \"%s\" is using host device with GUID: %s\n", 931 DrvAud RecSrcToStr(pDSoundStream->enmRecSource), pszGUID? pszGUID: "{?}"));931 DrvAudHlpRecSrcToStr(pDSoundStream->enmRecSource), pszGUID? pszGUID: "{?}")); 932 932 RTStrFree(pszGUID); 933 933 … … 1425 1425 pDSoundStream->streamCfg.enmEndianness = PDMAUDIOHOSTENDIANNESS; 1426 1426 1427 int rc = DrvAudio StreamCfgToProps(&pDSoundStream->streamCfg, &pDSoundStream->Stream.Props);1427 int rc = DrvAudioHlpStreamCfgToProps(&pDSoundStream->streamCfg, &pDSoundStream->Stream.Props); 1428 1428 if (RT_SUCCESS(rc)) 1429 1429 { … … 1686 1686 1687 1687 /** @todo caller should already init Props? */ 1688 int rc = DrvAudio StreamCfgToProps(&pDSoundStream->streamCfg, &pStream->Props);1688 int rc = DrvAudioHlpStreamCfgToProps(&pDSoundStream->streamCfg, &pStream->Props); 1689 1689 if (RT_SUCCESS(rc)) 1690 1690 { -
trunk/src/VBox/Devices/Audio/DrvHostNullAudio.cpp
r61163 r61167 115 115 116 116 /* Just adopt the wanted stream configuration. */ 117 int rc = DrvAudio StreamCfgToProps(pCfg, &pStream->Props);117 int rc = DrvAudioHlpStreamCfgToProps(pCfg, &pStream->Props); 118 118 if (RT_SUCCESS(rc)) 119 119 { … … 133 133 134 134 /* Just adopt the wanted stream configuration. */ 135 int rc = DrvAudio StreamCfgToProps(pCfg, &pStream->Props);135 int rc = DrvAudioHlpStreamCfgToProps(pCfg, &pStream->Props); 136 136 if (RT_SUCCESS(rc)) 137 137 { -
trunk/src/VBox/Devices/Audio/DrvHostOSSAudio.cpp
r61157 r61167 368 368 case PDMAUDIOSTREAMCMD_RESUME: 369 369 { 370 DrvAudio ClearBuf(&pStream->Props,370 DrvAudioHlpClearBuf(&pStream->Props, 371 371 pThisStream->pvBuf, pThisStream->cbBuf, AudioMixBufSize(&pStream->MixBuf)); 372 372 … … 684 684 streamCfg.enmEndianness = obtStream.enmENDIANNESS; 685 685 686 rc = DrvAudio StreamCfgToProps(&streamCfg, &pStream->Props);686 rc = DrvAudioHlpStreamCfgToProps(&streamCfg, &pStream->Props); 687 687 if (RT_SUCCESS(rc)) 688 688 { … … 764 764 streamCfg.enmEndianness = obtStream.enmENDIANNESS; 765 765 766 rc = DrvAudio StreamCfgToProps(&streamCfg, &pStream->Props);766 rc = DrvAudioHlpStreamCfgToProps(&streamCfg, &pStream->Props); 767 767 if (RT_SUCCESS(rc)) 768 768 cSamples = (obtStream.cFragments * obtStream.cbFragmentSize) -
trunk/src/VBox/Devices/Audio/DrvHostPulseAudio.cpp
r61157 r61167 652 652 streamCfg.cChannels = pStrm->SampleSpec.channels; 653 653 654 rc = DrvAudio StreamCfgToProps(&streamCfg, &pStream->Props);654 rc = DrvAudioHlpStreamCfgToProps(&streamCfg, &pStream->Props); 655 655 if (RT_SUCCESS(rc)) 656 656 { … … 722 722 streamCfg.cChannels = pStrm->SampleSpec.channels; 723 723 724 rc = DrvAudio StreamCfgToProps(&streamCfg, &pStream->Props);724 rc = DrvAudioHlpStreamCfgToProps(&streamCfg, &pStream->Props); 725 725 if (RT_SUCCESS(rc)) 726 726 { -
trunk/src/VBox/Devices/Audio/testcase/tstAudioMixBuffer.cpp
r60925 r61167 53 53 PDMPCMPROPS props; 54 54 55 int rc = DrvAudio StreamCfgToProps(&config, &props);55 int rc = DrvAudioHlpStreamCfgToProps(&config, &props); 56 56 AssertRC(rc); 57 57 … … 155 155 PDMPCMPROPS props; 156 156 157 int rc = DrvAudio StreamCfgToProps(&cfg_p, &props);157 int rc = DrvAudioHlpStreamCfgToProps(&cfg_p, &props); 158 158 AssertRC(rc); 159 159 … … 172 172 }; 173 173 174 rc = DrvAudio StreamCfgToProps(&cfg_c1, &props);174 rc = DrvAudioHlpStreamCfgToProps(&cfg_c1, &props); 175 175 AssertRC(rc); 176 176 … … 190 190 }; 191 191 192 rc = DrvAudio StreamCfgToProps(&cfg_c2, &props);192 rc = DrvAudioHlpStreamCfgToProps(&cfg_c2, &props); 193 193 AssertRC(rc); 194 194 … … 275 275 }; 276 276 277 int rc = DrvAudio StreamCfgToProps(&cfg_p, &props);277 int rc = DrvAudioHlpStreamCfgToProps(&cfg_p, &props); 278 278 AssertRC(rc); 279 279 … … 299 299 }; 300 300 301 rc = DrvAudio StreamCfgToProps(&cfg_c, &props);301 rc = DrvAudioHlpStreamCfgToProps(&cfg_c, &props); 302 302 AssertRC(rc); 303 303 … … 385 385 }; 386 386 387 int rc = DrvAudio StreamCfgToProps(&cfg_p, &props);387 int rc = DrvAudioHlpStreamCfgToProps(&cfg_p, &props); 388 388 AssertRC(rc); 389 389 … … 402 402 }; 403 403 404 rc = DrvAudio StreamCfgToProps(&cfg_c, &props);404 rc = DrvAudioHlpStreamCfgToProps(&cfg_c, &props); 405 405 AssertRC(rc); 406 406 … … 489 489 }; 490 490 491 int rc = DrvAudio StreamCfgToProps(&cfg, &props);491 int rc = DrvAudioHlpStreamCfgToProps(&cfg, &props); 492 492 AssertRC(rc); 493 493 -
trunk/src/VBox/Main/src-client/DrvAudioVRDE.cpp
r61157 r61167 97 97 *pcSamples = _4K; /** @todo Make this configurable. */ 98 98 99 return DrvAudio StreamCfgToProps(pCfg, &pVRDEStrmIn->Stream.Props);99 return DrvAudioHlpStreamCfgToProps(pCfg, &pVRDEStrmIn->Stream.Props); 100 100 } 101 101 … … 114 114 *pcSamples = _4K; /** @todo Make this configurable. */ 115 115 116 return DrvAudio StreamCfgToProps(pCfg, &pVRDEStrmOut->Stream.Props);116 return DrvAudioHlpStreamCfgToProps(pCfg, &pVRDEStrmOut->Stream.Props); 117 117 } 118 118
Note:
See TracChangeset
for help on using the changeset viewer.