Changeset 62965 in vbox for trunk/src/VBox/Devices/Audio
- Timestamp:
- Aug 4, 2016 9:57:20 AM (8 years ago)
- Location:
- trunk/src/VBox/Devices/Audio
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Audio/AudioMixBuffer.cpp
r62909 r62965 583 583 584 584 /** Dummy conversion used when the source is muted. */ 585 static DECLCALLBACK(uint32_t) audioMixBufConvFromSilence(PPDMAUDIOSAMPLE paDst, const void *pvSrc, 586 uint32_t cbSrc, PCPDMAUDMIXBUFCONVOPTS pOpts) 587 { 585 static DECLCALLBACK(uint32_t) 586 audioMixBufConvFromSilence(PPDMAUDIOSAMPLE paDst, const void *pvSrc, uint32_t cbSrc, PCPDMAUDMIXBUFCONVOPTS pOpts) 587 { 588 RT_NOREF(cbSrc, pvSrc); 589 588 590 /* Internally zero always corresponds to silence. */ 589 591 RT_BZERO(paDst, pOpts->cSamples * sizeof(paDst[0])); … … 648 650 } 649 651 } 650 651 return NULL; 652 /* not reached */ 652 653 } 653 654 … … 709 710 } 710 711 } 711 712 return NULL; 712 /* not reached */ 713 713 } 714 714 … … 1019 1019 #endif 1020 1020 1021 uint32_t cSrcToRead ;1021 uint32_t cSrcToRead = 0; 1022 1022 uint32_t cSrcRead; 1023 1023 -
trunk/src/VBox/Devices/Audio/AudioMixer.cpp
r62605 r62965 129 129 int AudioMixerCreate(const char *pszName, uint32_t fFlags, PAUDIOMIXER *ppMixer) 130 130 { 131 RT_NOREF(fFlags); 131 132 AssertPtrReturn(pszName, VERR_INVALID_POINTER); 132 133 /** @todo Add fFlags validation. */ … … 176 177 void AudioMixerDebug(PAUDIOMIXER pMixer, PCDBGFINFOHLP pHlp, const char *pszArgs) 177 178 { 179 RT_NOREF(pszArgs); 178 180 PAUDMIXSINK pSink; 179 181 unsigned iSink = 0; … … 491 493 /* Increase the stream's reference count to let others know 492 494 * we're reyling on it to be around now. */ 493 pConn->pfnStream AddRef(pConn, pStream);495 pConn->pfnStreamRetain(pConn, pStream); 494 496 } 495 497 … … 763 765 int AudioMixerSinkRead(PAUDMIXSINK pSink, AUDMIXOP enmOp, void *pvBuf, uint32_t cbBuf, uint32_t *pcbRead) 764 766 { 767 RT_NOREF(enmOp); 765 768 AssertPtrReturn(pSink, VERR_INVALID_POINTER); 766 769 AssertPtrReturn(pvBuf, VERR_INVALID_POINTER); … … 1080 1083 AssertPtr(pConn); 1081 1084 1082 uint32_t cPlayed = 0;1083 1085 uint32_t cCaptured = 0; 1084 1086 … … 1257 1259 int AudioMixerSinkWrite(PAUDMIXSINK pSink, AUDMIXOP enmOp, const void *pvBuf, uint32_t cbBuf, uint32_t *pcbWritten) 1258 1260 { 1261 RT_NOREF(enmOp); 1259 1262 AssertPtrReturn(pSink, VERR_INVALID_POINTER); 1260 1263 /* pcbWritten is optional. */ … … 1320 1323 int AudioMixerStreamCtl(PAUDMIXSTREAM pMixStream, PDMAUDIOSTREAMCMD enmCmd, uint32_t fCtl) 1321 1324 { 1325 RT_NOREF(fCtl); 1322 1326 AssertPtrReturn(pMixStream, VERR_INVALID_POINTER); 1323 1327 /** @todo Validate fCtl. */ -
trunk/src/VBox/Devices/Audio/DevSB16.cpp
r62605 r62965 2153 2153 rc2 = pDrv->pConnector->pfnStreamCreate(pDrv->pConnector, &CfgHost, pCfg, &pDrv->Out.pStream); 2154 2154 if (RT_SUCCESS(rc2)) 2155 pDrv->pConnector->pfnStream AddRef(pDrv->pConnector, pDrv->Out.pStream);2155 pDrv->pConnector->pfnStreamRetain(pDrv->pConnector, pDrv->Out.pStream); 2156 2156 } 2157 2157 -
trunk/src/VBox/Devices/Audio/DrvAudio.cpp
r62607 r62965 785 785 786 786 /** 787 * @interface_method_impl{PDMIAUDIOCONNECTOR,pfnStream AddRef}788 */ 789 static DECLCALLBACK(uint32_t) drvAudioStream AddRef(PPDMIAUDIOCONNECTOR pInterface, PPDMAUDIOSTREAM pStream)790 { 791 AssertPtrReturn(pInterface, VERR_INVALID_POINTER);792 AssertPtrReturn(pStream, VERR_INVALID_POINTER);787 * @interface_method_impl{PDMIAUDIOCONNECTOR,pfnStreamRetain} 788 */ 789 static DECLCALLBACK(uint32_t) drvAudioStreamRetain(PPDMIAUDIOCONNECTOR pInterface, PPDMAUDIOSTREAM pStream) 790 { 791 AssertPtrReturn(pInterface, UINT32_MAX); 792 AssertPtrReturn(pStream, UINT32_MAX); 793 793 794 794 NOREF(pInterface); … … 802 802 static DECLCALLBACK(uint32_t) drvAudioStreamRelease(PPDMIAUDIOCONNECTOR pInterface, PPDMAUDIOSTREAM pStream) 803 803 { 804 AssertPtrReturn(pInterface, VERR_INVALID_POINTER);805 AssertPtrReturn(pStream, VERR_INVALID_POINTER);804 AssertPtrReturn(pInterface, UINT32_MAX); 805 AssertPtrReturn(pStream, UINT32_MAX); 806 806 807 807 NOREF(pInterface); … … 1868 1868 AssertPtrReturn(pVol, VERR_INVALID_POINTER); 1869 1869 1870 PDRVAUDIO pThis = PDMIAUDIOCONNECTOR_2_DRVAUDIO(pInterface);1871 1872 1870 LogFlowFunc(("%s: volL=%RU32, volR=%RU32, fMute=%RTbool\n", pStream->szName, pVol->uLeft, pVol->uRight, pVol->fMuted)); 1873 1871 … … 2150 2148 pThis->IAudioConnector.pfnStreamCreate = drvAudioStreamCreate; 2151 2149 pThis->IAudioConnector.pfnStreamDestroy = drvAudioStreamDestroy; 2152 pThis->IAudioConnector.pfnStream AddRef = drvAudioStreamAddRef;2150 pThis->IAudioConnector.pfnStreamRetain = drvAudioStreamRetain; 2153 2151 pThis->IAudioConnector.pfnStreamRelease = drvAudioStreamRelease; 2154 2152 pThis->IAudioConnector.pfnStreamControl = drvAudioStreamControl;
Note:
See TracChangeset
for help on using the changeset viewer.