- Timestamp:
- Apr 26, 2021 8:50:18 PM (4 years ago)
- svn:sync-xref-src-repo-rev:
- 144035
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Audio/DrvAudio.cpp
r88715 r88717 331 331 static int drvAudioDevicesEnumerateInternal(PDRVAUDIO pThis, bool fLog, PPDMAUDIOHOSTENUM pDevEnum); 332 332 #endif 333 334 333 static int drvAudioStreamControlInternalBackend(PDRVAUDIO pThis, PDRVAUDIOSTREAM pStreamEx, PDMAUDIOSTREAMCMD enmStreamCmd); 335 334 static int drvAudioStreamControlInternal(PDRVAUDIO pThis, PDRVAUDIOSTREAM pStreamEx, PDMAUDIOSTREAMCMD enmStreamCmd); 336 335 static int drvAudioStreamCreateInternalBackend(PDRVAUDIO pThis, PDRVAUDIOSTREAM pStreamEx, PPDMAUDIOSTREAMCFG pCfgReq, PPDMAUDIOSTREAMCFG pCfgAcq); 337 336 static int drvAudioStreamDestroyInternalBackend(PDRVAUDIO pThis, PDRVAUDIOSTREAM pStreamEx); 338 static void drvAudioStreamFree(PDRVAUDIOSTREAM pStream);339 337 static int drvAudioStreamUninitInternal(PDRVAUDIO pThis, PDRVAUDIOSTREAM pStreamEx); 340 338 static int drvAudioStreamIterateInternal(PDRVAUDIO pThis, PDRVAUDIOSTREAM pStreamEx); 341 static void drvAudioStreamDropInternal(PDRVAUDIO pThis, PDRVAUDIOSTREAM pStreamEx);342 static void drvAudioStreamResetInternal(PDRVAUDIO pThis, PDRVAUDIOSTREAM pStreamEx);343 339 344 340 … … 421 417 } 422 418 419 420 /** 421 * Drops all audio data (and associated state) of a stream. 422 * 423 * @param pThis Pointer to driver instance. 424 * @param pStreamEx Stream to drop data for. 425 */ 426 static void drvAudioStreamDropInternal(PDRVAUDIO pThis, PDRVAUDIOSTREAM pStreamEx) 427 { 428 RT_NOREF(pThis); 429 430 LogFunc(("[%s]\n", pStreamEx->Core.szName)); 431 432 if (pStreamEx->fNoMixBufs) 433 { 434 AudioMixBufReset(&pStreamEx->Guest.MixBuf); 435 AudioMixBufReset(&pStreamEx->Host.MixBuf); 436 } 437 438 pStreamEx->fThresholdReached = false; 439 pStreamEx->nsLastIterated = 0; 440 pStreamEx->nsLastPlayedCaptured = 0; 441 pStreamEx->nsLastReadWritten = 0; 442 } 443 444 423 445 #ifdef VBOX_WITH_AUDIO_CALLBACKS 424 446 /** … … 436 458 RTListForEach(&pThis->lstStreams, pStreamEx, DRVAUDIOSTREAM, ListEntry) 437 459 { 438 pStreamEx->Core.fStatus 439 pStreamEx->cTriesReInit 440 pStreamEx->nsLastReInit 460 pStreamEx->Core.fStatus |= PDMAUDIOSTREAMSTS_FLAGS_PENDING_REINIT; 461 pStreamEx->cTriesReInit = 0; 462 pStreamEx->nsLastReInit = 0; 441 463 } 442 464 … … 447 469 } 448 470 #endif /* VBOX_WITH_AUDIO_CALLBACKS */ 471 449 472 450 473 /** … … 511 534 } 512 535 513 /**514 * Drops all audio data (and associated state) of a stream.515 *516 * @param pThis Pointer to driver instance.517 * @param pStreamEx Stream to drop data for.518 */519 static void drvAudioStreamDropInternal(PDRVAUDIO pThis, PDRVAUDIOSTREAM pStreamEx)520 {521 RT_NOREF(pThis);522 523 LogFunc(("[%s]\n", pStreamEx->Core.szName));524 525 if (pStreamEx->fNoMixBufs)526 {527 AudioMixBufReset(&pStreamEx->Guest.MixBuf);528 AudioMixBufReset(&pStreamEx->Host.MixBuf);529 }530 531 pStreamEx->fThresholdReached = false;532 pStreamEx->nsLastIterated = 0;533 pStreamEx->nsLastPlayedCaptured = 0;534 pStreamEx->nsLastReadWritten = 0;535 }536 536 537 537 /** … … 2502 2502 * @param pThis Pointer to driver instance. 2503 2503 * @param pStreamEx Stream to iterate. 2504 *2505 * @todo r=bird: Don't know why the default behavior isn't to push data into2506 * the backend... We'll never get out of the pending-disable state if2507 * the mixing buffer doesn't empty out.2508 2504 */ 2509 2505 static int drvAudioStreamIterateInternal(PDRVAUDIO pThis, PDRVAUDIOSTREAM pStreamEx)
Note:
See TracChangeset
for help on using the changeset viewer.