- Timestamp:
- Mar 8, 2021 12:39:21 PM (4 years ago)
- svn:sync-xref-src-repo-rev:
- 143138
- Location:
- trunk/src/VBox/Devices/Audio
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Audio/AudioMixer.cpp
r88002 r88010 618 618 619 619 PDMAUDIOSTREAMCFG CfgHost; 620 rc = DrvAudioHlp PCMPropsToStreamCfg(&pSink->PCMProps, &CfgHost);620 rc = DrvAudioHlpStreamCfgInitFromPcmProps(&CfgHost, &pSink->PCMProps); 621 621 AssertRCReturn(rc, rc); 622 622 -
trunk/src/VBox/Devices/Audio/DrvAudio.h
r88009 r88010 221 221 bool DrvAudioHlpPCMPropsAreValid(PCPDMAUDIOPCMPROPS pProps); 222 222 void DrvAudioHlpPCMPropsPrint(PCPDMAUDIOPCMPROPS pProps); 223 int DrvAudioHlpPCMPropsToStreamCfg(PCPDMAUDIOPCMPROPS pPCMProps, PPDMAUDIOSTREAMCFG pCfg);224 223 /** @} */ 225 224 … … 227 226 * @{ */ 228 227 void DrvAudioHlpStreamCfgInit(PPDMAUDIOSTREAMCFG pCfg); 228 int DrvAudioHlpStreamCfgInitFromPcmProps(PPDMAUDIOSTREAMCFG pCfg, PCPDMAUDIOPCMPROPS pPCMProps); 229 229 bool DrvAudioHlpStreamCfgIsValid(PCPDMAUDIOSTREAMCFG pCfg); 230 230 int DrvAudioHlpStreamCfgCopy(PPDMAUDIOSTREAMCFG pDstCfg, PCPDMAUDIOSTREAMCFG pSrcCfg); -
trunk/src/VBox/Devices/Audio/DrvAudioCommon.cpp
r88009 r88010 749 749 750 750 pCfg->Backend.cFramesPreBuffering = UINT32_MAX; /* Explicitly set to "undefined". */ 751 } 752 753 /** 754 * Initializes a stream configuration from PCM properties. 755 * 756 * @return IPRT status code. 757 * @param pCfg Stream configuration to initialize. 758 * @param pProps PCM properties to use. 759 */ 760 int DrvAudioHlpStreamCfgInitFromPcmProps(PPDMAUDIOSTREAMCFG pCfg, PCPDMAUDIOPCMPROPS pProps) 761 { 762 AssertPtrReturn(pProps, VERR_INVALID_POINTER); 763 AssertPtrReturn(pCfg, VERR_INVALID_POINTER); 764 765 DrvAudioHlpStreamCfgInit(pCfg); 766 767 memcpy(&pCfg->Props, pProps, sizeof(PDMAUDIOPCMPROPS)); 768 return VINF_SUCCESS; 751 769 } 752 770 … … 1418 1436 Log(("uHz=%RU32, cChannels=%RU8, cBits=%RU8%s", 1419 1437 pProps->uHz, pProps->cChannels, pProps->cbSample * 8, pProps->fSigned ? "S" : "U")); 1420 }1421 1422 /**1423 * Converts PCM properties to a audio stream configuration.1424 *1425 * @return IPRT status code.1426 * @param pProps PCM properties to convert.1427 * @param pCfg Stream configuration to store result into.1428 * @todo r=bird: Rename to DrvAudioHlpStreamCfgInitFromPCMProps.1429 */1430 int DrvAudioHlpPCMPropsToStreamCfg(PCPDMAUDIOPCMPROPS pProps, PPDMAUDIOSTREAMCFG pCfg)1431 {1432 AssertPtrReturn(pProps, VERR_INVALID_POINTER);1433 AssertPtrReturn(pCfg, VERR_INVALID_POINTER);1434 1435 DrvAudioHlpStreamCfgInit(pCfg);1436 1437 memcpy(&pCfg->Props, pProps, sizeof(PDMAUDIOPCMPROPS));1438 return VINF_SUCCESS;1439 1438 } 1440 1439
Note:
See TracChangeset
for help on using the changeset viewer.