WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
130743
WebCore portion to tell if audio is playing in a plugin process
https://bugs.webkit.org/show_bug.cgi?id=130743
Summary
WebCore portion to tell if audio is playing in a plugin process
Stephanie Lewis
Reported
2014-03-25 15:09:47 PDT
Listen to a CoreAudio property to tell if audio hardware is playing audio in the current process.
Attachments
patch
(22.20 KB, patch)
2014-03-25 15:12 PDT
,
Stephanie Lewis
jer.noble
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Stephanie Lewis
Comment 1
2014-03-25 15:12:26 PDT
Created
attachment 227804
[details]
patch
WebKit Commit Bot
Comment 2
2014-03-25 15:13:56 PDT
Attachment 227804
[details]
did not pass style-queue: ERROR: Source/WebCore/ChangeLog:4: Line contains tab character. [whitespace/tab] [5] ERROR: Source/WebCore/ChangeLog:10: Line contains tab character. [whitespace/tab] [5] ERROR: Source/WebCore/platform/audio/mac/AudioHardwareListenerMac.cpp:34: enum members should use InterCaps with an initial capital letter. [readability/enum_casing] [4] ERROR: Source/WebCore/platform/audio/mac/AudioHardwareListenerMac.cpp:49: Tab found; better to use spaces [whitespace/tab] [1] ERROR: Source/WebCore/platform/audio/mac/AudioHardwareListenerMac.cpp:50: Tab found; better to use spaces [whitespace/tab] [1] ERROR: Source/WebCore/platform/audio/mac/AudioHardwareListenerMac.cpp:55: Tab found; better to use spaces [whitespace/tab] [1] ERROR: Source/WebCore/platform/audio/AudioHardwareListener.h:29: Alphabetical sorting problem. [build/include_order] [4] Total errors found: 7 in 7 files If any of these errors are false positives, please file a bug against check-webkit-style.
Jer Noble
Comment 3
2014-03-25 15:35:29 PDT
Comment on
attachment 227804
[details]
patch 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.
Stephanie Lewis
Comment 4
2014-03-28 18:21:14 PDT
http://trac.webkit.org/changeset/166442
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug