Changeset 241021 in webkit
- Timestamp:
- Feb 6, 2019 8:58:46 AM (5 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r241018 r241021 1 2019-02-06 Youenn Fablet <youenn@apple.com> 2 3 Disable audio ducking at Audio Unit setup time 4 https://bugs.webkit.org/show_bug.cgi?id=194303 5 6 Reviewed by Eric Carlson. 7 8 When creating a CoreAudioCaptureSource, the audio unit might be 9 reconfigured if a past audio capture was done. 10 This might trigger audio ducking which is undone in startInternal. 11 In some cases, startInternal will never call start. 12 In that case, the audio unit will continue ducking the other processing. 13 To ensure ducking is disabled, unduck in setupAudioUnit as well as startInternal. 14 15 In addition to that, once a shared unit is created, it stays alive until the UIProcess exits. 16 This might affect all applications. 17 Instead, whenever the shared unit is stopped, clean it so as to restore the state as if no capture ever happened. 18 This has noticeable effects in the quality of audio being played on bluetooth devices. 19 20 Covered by manual tests. 21 22 * platform/mediastream/mac/CoreAudioCaptureSource.cpp: 23 (WebCore::CoreAudioSharedUnit::setupAudioUnit): 24 (WebCore::CoreAudioSharedUnit::unduck): 25 (WebCore::CoreAudioSharedUnit::startInternal): 26 (WebCore::CoreAudioSharedUnit::captureFailed): 27 (WebCore::CoreAudioSharedUnit::stopProducingData): 28 1 29 2019-02-06 Antti Koivisto <antti@apple.com> 2 30 -
trunk/Source/WebCore/platform/mediastream/mac/CoreAudioCaptureSource.cpp
r239531 r241021 123 123 void stopInternal(); 124 124 125 void unduck(); 126 125 127 void verifyIsCapturing(); 126 128 void devicesChanged(); … … 340 342 m_suspended = false; 341 343 344 unduck(); 345 342 346 return err; 347 } 348 349 void CoreAudioSharedUnit::unduck() 350 { 351 uint32_t outputDevice; 352 if (!defaultOutputDevice(&outputDevice)) 353 AudioDeviceDuck(outputDevice, 1.0, nullptr, 0); 343 354 } 344 355 … … 613 624 } 614 625 615 uint32_t outputDevice; 616 if (!defaultOutputDevice(&outputDevice)) 617 AudioDeviceDuck(outputDevice, 1.0, nullptr, 0); 626 unduck(); 618 627 619 628 err = AudioOutputUnitStart(m_ioUnit); … … 644 653 } 645 654 646 647 655 void CoreAudioSharedUnit::captureFailed() 648 656 { 649 657 #if !RELEASE_LOG_DISABLED 650 RELEASE_LOG_ERROR(Media, "CoreAudioSharedUnit::captureFailed - capture failed \n");658 RELEASE_LOG_ERROR(Media, "CoreAudioSharedUnit::captureFailed - capture failed"); 651 659 #endif 652 660 for (CoreAudioCaptureSource& client : m_clients) … … 668 676 669 677 stopInternal(); 678 cleanupAudioUnit(); 670 679 } 671 680
Note: See TracChangeset
for help on using the changeset viewer.