Changeset 76686 in vbox
- Timestamp:
- Jan 7, 2019 4:45:48 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Audio/DrvAudio.cpp
r76553 r76686 55 55 static int drvAudioStreamIterateInternal(PDRVAUDIO pThis, PPDMAUDIOSTREAM pStream); 56 56 static int drvAudioStreamReInitInternal(PDRVAUDIO pThis, PPDMAUDIOSTREAM pStream); 57 static void drvAudioStreamDropInternal(PDRVAUDIO pThis, PPDMAUDIOSTREAM pStream); 57 58 static void drvAudioStreamResetInternal(PDRVAUDIO pThis, PPDMAUDIOSTREAM pStream); 58 59 … … 376 377 rc = drvAudioStreamControlInternalBackend(pThis, pStream, PDMAUDIOSTREAMCMD_DISABLE); 377 378 if (RT_SUCCESS(rc)) 378 pStream->fStatus &= ~PDMAUDIOSTREAMSTS_FLAG_ENABLED;379 drvAudioStreamResetInternal(pThis, pStream); 379 380 } 380 381 } … … 409 410 if (RT_SUCCESS(rc)) 410 411 { 411 drvAudioStream ResetInternal(pThis, pStream);412 drvAudioStreamDropInternal(pThis, pStream); 412 413 } 413 414 break; … … 464 465 { 465 466 if (pStream->fStatus & PDMAUDIOSTREAMSTS_FLAG_ENABLED) 466 {467 467 rc = pThis->pHostDrvAudio->pfnStreamControl(pThis->pHostDrvAudio, pStream->pvBackend, PDMAUDIOSTREAMCMD_DISABLE); 468 if (RT_SUCCESS(rc))469 AudioMixBufReset(&pStream->Host.MixBuf);470 }471 468 break; 472 469 } … … 812 809 } 813 810 814 /* D o the internal reset. */815 drvAudioStream ResetInternal(pThis, pStream);811 /* Drop all old data. */ 812 drvAudioStreamDropInternal(pThis, pStream); 816 813 817 814 /* … … 828 825 } 829 826 830 static void drvAudioStreamResetInternal(PDRVAUDIO pThis, PPDMAUDIOSTREAM pStream) 827 /** 828 * Drops all audio data (and associated state) of a stream. 829 * 830 * @param pThis Pointer to driver instance. 831 * @param pStream Stream to drop data for. 832 */ 833 static void drvAudioStreamDropInternal(PDRVAUDIO pThis, PPDMAUDIOSTREAM pStream) 831 834 { 832 835 RT_NOREF(pThis); 836 837 LogFunc(("[%s]\n", pStream->szName)); 833 838 834 839 AudioMixBufReset(&pStream->Guest.MixBuf); 835 840 AudioMixBufReset(&pStream->Host.MixBuf); 841 842 pStream->tsLastIteratedNs = 0; 843 pStream->tsLastPlayedCapturedNs = 0; 844 pStream->tsLastReadWrittenNs = 0; 845 846 pStream->fThresholdReached = false; 847 } 848 849 /** 850 * Resets a given audio stream. 851 * 852 * @param pThis Pointer to driver instance. 853 * @param pStream Stream to reset. 854 */ 855 static void drvAudioStreamResetInternal(PDRVAUDIO pThis, PPDMAUDIOSTREAM pStream) 856 { 857 drvAudioStreamDropInternal(pThis, pStream); 858 859 LogFunc(("[%s]\n", pStream->szName)); 860 861 pStream->fStatus = PDMAUDIOSTREAMSTS_FLAG_INITIALIZED; 836 862 837 863 #ifdef VBOX_WITH_STATISTICS … … 1168 1194 { 1169 1195 pStream->fStatus &= ~(PDMAUDIOSTREAMSTS_FLAG_ENABLED | PDMAUDIOSTREAMSTS_FLAG_PENDING_DISABLE); 1196 drvAudioStreamDropInternal(pThis, pStream); 1170 1197 } 1171 1198 else
Note:
See TracChangeset
for help on using the changeset viewer.