Changeset 76777 in vbox for trunk/src/VBox/Devices/Audio
- Timestamp:
- Jan 11, 2019 1:53:44 PM (6 years ago)
- Location:
- trunk/src/VBox/Devices/Audio
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Audio/AudioMixer.cpp
r76553 r76777 770 770 case AUDMIXSINKCMD_DROP: 771 771 { 772 #ifdef VBOX_AUDIO_MIXER_WITH_MIXBUF773 772 AudioMixBufReset(&pSink->MixBuf); 774 #endif 773 775 774 /* Clear dirty bit, keep others. */ 776 775 pSink->fStatus &= ~AUDMIXSINK_STS_DIRTY; … … 955 954 && !(pSink->fStatus & AUDMIXSINK_STS_PENDING_DISABLE)) 956 955 { 957 #ifdef VBOX_AUDIO_MIXER_WITH_MIXBUF958 956 cbWritable = AudioMixBufFreeBytes(&pSink->MixBuf); 959 #else960 /* Return how much data we expect since the last write. */961 cbWritable = DrvAudioHlpMilliToBytes(10 /* ms */, &pSink->PCMProps); /** @todo Make this configurable! */962 #endif963 957 } 964 958 … … 1314 1308 LogFunc(("[%s]\n", pSink->pszName)); 1315 1309 1316 #ifdef VBOX_AUDIO_MIXER_WITH_MIXBUF1317 1310 AudioMixBufReset(&pSink->MixBuf); 1318 #endif1319 1311 1320 1312 /* Update last updated timestamp. */ … … 1422 1414 pSink->pszName, pSink->PCMProps.cBytes * 8, pSink->PCMProps.cChannels, pSink->PCMProps.uHz)); 1423 1415 1424 #ifdef VBOX_AUDIO_MIXER_WITH_MIXBUF1425 1416 /* Also update the sink's mixing buffer format. */ 1426 1417 AudioMixBufDestroy(&pSink->MixBuf); … … 1435 1426 } 1436 1427 } 1437 #endif /* VBOX_AUDIO_MIXER_WITH_MIXBUF */1438 1428 1439 1429 #ifdef VBOX_AUDIO_MIXER_DEBUG … … 1968 1958 if (cbWrittenBuf) /* Update the mixer stream's last written time stamp. */ 1969 1959 pMixStream->tsLastReadWrittenNs = RTTimeNanoTS(); 1960 1961 Log3Func(("[%s] Mixer stream '%s' -> cbWrittenBuf=%RU32\n", pSink->pszName, pMixStream->pszName, cbWrittenBuf)); 1970 1962 } 1971 1963 } -
trunk/src/VBox/Devices/Audio/AudioMixer.h
r76565 r76777 29 29 30 30 #include <VBox/vmm/pdmaudioifs.h> 31 32 /* Use a mixer sink's mixing buffer for multiplexing. */33 #define VBOX_AUDIO_MIXER_WITH_MIXBUF34 31 35 32 /** … … 171 168 /** The sink's critical section. */ 172 169 RTCRITSECT CritSect; 173 #ifdef VBOX_AUDIO_MIXER_WITH_MIXBUF174 170 /** This sink's mixing buffer, acting as 175 171 * a parent buffer for all streams this sink owns. */ 176 172 PDMAUDIOMIXBUF MixBuf; 177 #endif178 173 /** Union for input/output specifics. */ 179 174 union
Note:
See TracChangeset
for help on using the changeset viewer.