| Index: Source/modules/webmidi/MIDIInput.cpp
|
| diff --git a/Source/modules/webmidi/MIDIInput.cpp b/Source/modules/webmidi/MIDIInput.cpp
|
| index 1e9e62c80095d7bcfaa742d97850f4bb4e8f32a0..5dcb2f9e2bbebe2d552df85b7f9ded66cf7e3d14 100644
|
| --- a/Source/modules/webmidi/MIDIInput.cpp
|
| +++ b/Source/modules/webmidi/MIDIInput.cpp
|
| @@ -30,21 +30,28 @@
|
|
|
| #include "config.h"
|
| #include "modules/webmidi/MIDIInput.h"
|
| +
|
| +#include "modules/webmidi/MIDIAccess.h"
|
| #include "modules/webmidi/MIDIMessageEvent.h"
|
|
|
| namespace WebCore {
|
|
|
| -PassRefPtr<MIDIInput> MIDIInput::create(ScriptExecutionContext* context, const String& id, const String& manufacturer, const String& name, const String& version)
|
| +PassRefPtr<MIDIInput> MIDIInput::create(MIDIAccess* access, ScriptExecutionContext* context, const String& id, const String& manufacturer, const String& name, const String& version)
|
| {
|
| - return adoptRef(new MIDIInput(context, id, manufacturer, name, version));
|
| + return adoptRef(new MIDIInput(access, context, id, manufacturer, name, version));
|
| }
|
|
|
| -MIDIInput::MIDIInput(ScriptExecutionContext* context, const String& id, const String& manufacturer, const String& name, const String& version)
|
| +MIDIInput::MIDIInput(MIDIAccess* access, ScriptExecutionContext* context, const String& id, const String& manufacturer, const String& name, const String& version)
|
| : MIDIPort(context, id, manufacturer, name, MIDIPortTypeInput, version)
|
| + , m_access(access)
|
| {
|
| ScriptWrappable::init(this);
|
| }
|
|
|
| +MIDIInput::~MIDIInput()
|
| +{
|
| +}
|
| +
|
| void MIDIInput::didReceiveMIDIData(unsigned portIndex, const unsigned char* data, size_t length, double timeStamp)
|
| {
|
| ASSERT(isMainThread());
|
| @@ -57,8 +64,8 @@ void MIDIInput::didReceiveMIDIData(unsigned portIndex, const unsigned char* data
|
| unsigned char status = data[i];
|
| unsigned char strippedStatus = status & 0xf0;
|
|
|
| - // FIXME: support System Exclusive.
|
| - if (strippedStatus >= 0xf0)
|
| + // FIXME: integrate sending side filtering and implement more extensive filtering.
|
| + if (strippedStatus >= 0xf0 && !m_access->sysExEnabled())
|
| break;
|
|
|
| // All non System Exclusive messages have a total size of 3 except for Program Change and Channel Pressure.
|
|
|