[Webkit-unassigned] [Bug 130743] WebCore portion to tell if audio is playing in a plugin process

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Mar 25 15:35:09 PDT 2014


https://bugs.webkit.org/show_bug.cgi?id=130743


Jer Noble <jer.noble at apple.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #227804|review?                     |review+
               Flag|                            |




--- Comment #3 from Jer Noble <jer.noble at apple.com>  2014-03-25 15:35:29 PST ---
(From update of attachment 227804)
View in context: https://bugs.webkit.org/attachment.cgi?id=227804&action=review

> Source/WebCore/platform/audio/AudioHardwareListener.h:47
> +    static bool audioHardwareListenerIsSupported();

Is there a reason this needs to be a static method?  Here's an alternative idea:

> Source/WebCore/platform/audio/AudioHardwareListener.h:48
> +    bool isHardwareActive() const { return m_active; }

Consider this instead:

enum HardwareActivityType {
    Unknown,
    IsActive,
    IsInactive,
};
HardwareActivityType hardwareActivity() const { return m_activity; }

> Source/WebCore/platform/audio/AudioHardwareListener.h:54
> +    bool m_active;

...and:

HardwareActivityType m_activity;

> Source/WebCore/platform/audio/AudioHardwareListener.cpp:46
> +    , m_active(false)

...and:

    , m_active(Unknown)

This way, we don't neeed audioHardwareListenerIsSupported(), but instead `listener->hardwareActivity()` will return `Unknown` when hardware activity listening is unavailable.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


More information about the webkit-unassigned mailing list