| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 185 MIDIOutput::MIDIOutput(MIDIAccess* access, unsigned portIndex, const String& id,
const String& manufacturer, const String& name, const String& version, PortStat
e state) | 185 MIDIOutput::MIDIOutput(MIDIAccess* access, unsigned portIndex, const String& id,
const String& manufacturer, const String& name, const String& version, PortStat
e state) |
| 186 : MIDIPort(access, id, manufacturer, name, MIDIPortTypeOutput, version, stat
e) | 186 : MIDIPort(access, id, manufacturer, name, MIDIPortTypeOutput, version, stat
e) |
| 187 , m_portIndex(portIndex) | 187 , m_portIndex(portIndex) |
| 188 { | 188 { |
| 189 } | 189 } |
| 190 | 190 |
| 191 MIDIOutput::~MIDIOutput() | 191 MIDIOutput::~MIDIOutput() |
| 192 { | 192 { |
| 193 } | 193 } |
| 194 | 194 |
| 195 void MIDIOutput::clear() |
| 196 { |
| 197 // FIXME: Add a blink API to Implement clear(). |
| 198 } |
| 199 |
| 195 void MIDIOutput::send(DOMUint8Array* array, double timestamp, ExceptionState& ex
ceptionState) | 200 void MIDIOutput::send(DOMUint8Array* array, double timestamp, ExceptionState& ex
ceptionState) |
| 196 { | 201 { |
| 197 if (timestamp == 0.0) | 202 if (timestamp == 0.0) |
| 198 timestamp = now(executionContext()); | 203 timestamp = now(executionContext()); |
| 199 | 204 |
| 200 if (!array) | 205 if (!array) |
| 201 return; | 206 return; |
| 202 | 207 |
| 203 if (MessageValidator::validate(array, exceptionState, midiAccess()->sysexEna
bled())) | 208 if (MessageValidator::validate(array, exceptionState, midiAccess()->sysexEna
bled())) |
| 204 midiAccess()->sendMIDIData(m_portIndex, array->data(), array->length(),
timestamp); | 209 midiAccess()->sendMIDIData(m_portIndex, array->data(), array->length(),
timestamp); |
| (...skipping 29 matching lines...) Expand all Loading... |
| 234 { | 239 { |
| 235 send(unsignedData, 0.0, exceptionState); | 240 send(unsignedData, 0.0, exceptionState); |
| 236 } | 241 } |
| 237 | 242 |
| 238 DEFINE_TRACE(MIDIOutput) | 243 DEFINE_TRACE(MIDIOutput) |
| 239 { | 244 { |
| 240 MIDIPort::trace(visitor); | 245 MIDIPort::trace(visitor); |
| 241 } | 246 } |
| 242 | 247 |
| 243 } // namespace blink | 248 } // namespace blink |
| OLD | NEW |