Changeset 229479 in webkit


Ignore:
Timestamp:
Mar 9, 2018 1:14:58 PM (6 years ago)
Author:
youenn@apple.com
Message:

Cannot change audio input source device
https://bugs.webkit.org/show_bug.cgi?id=175975
<rdar://problem/34073589>

Reviewed by Eric Carlson.

Covered by manually testing https://webrtc.github.io/samples/src/content/devices/input-output/ with a USB web cam.

  • platform/mediastream/mac/CoreAudioCaptureSource.cpp:

(WebCore::CoreAudioSharedUnit::setCaptureDeviceID):
(WebCore::CoreAudioCaptureSource::CoreAudioCaptureSource):

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r229475 r229479  
     12018-03-09  Youenn Fablet  <youenn@apple.com>
     2
     3        Cannot change audio input source device
     4        https://bugs.webkit.org/show_bug.cgi?id=175975
     5        <rdar://problem/34073589>
     6
     7        Reviewed by Eric Carlson.
     8
     9        Covered by manually testing https://webrtc.github.io/samples/src/content/devices/input-output/ with a USB web cam.
     10
     11        * platform/mediastream/mac/CoreAudioCaptureSource.cpp:
     12        (WebCore::CoreAudioSharedUnit::setCaptureDeviceID):
     13        (WebCore::CoreAudioCaptureSource::CoreAudioCaptureSource):
     14
    1152018-03-09  Jer Noble  <jer.noble@apple.com>
    216
  • trunk/Source/WebCore/platform/mediastream/mac/CoreAudioCaptureSource.cpp

    r228325 r229479  
    103103    bool hasAudioUnit() const { return m_ioUnit; }
    104104
     105    void setCaptureDeviceID(uint32_t);
     106
    105107private:
    106108    OSStatus configureSpeakerProc();
     
    194196        return &client == &item.get();
    195197    });
     198}
     199
     200void CoreAudioSharedUnit::setCaptureDeviceID(uint32_t captureDeviceID)
     201{
     202#if PLATFORM(MAC)
     203    if (m_captureDeviceID == captureDeviceID)
     204        return;
     205
     206    m_captureDeviceID = captureDeviceID;
     207    reconfigureAudioUnit();
     208#else
     209    UNUSED_PARAM(captureDeviceID);
     210#endif
    196211}
    197212
     
    763778{
    764779    auto& unit = CoreAudioSharedUnit::singleton();
     780    unit.setCaptureDeviceID(m_captureDeviceID);
    765781
    766782    initializeEchoCancellation(unit.enableEchoCancellation());
Note: See TracChangeset for help on using the changeset viewer.