Bug 1890793: Assert CallArgs::newTarget is not gray. r=spidermonkey-reviewers,sfink...
[gecko.git] / dom / midi / MIDIUtils.h
blobc5559dce7e45c1daafba47aa5faf80814cde75af
1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* vim:set ts=2 sw=2 sts=2 et cindent: */
3 /* This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
7 #include "nsTArray.h"
8 #include "mozilla/TimeStamp.h"
10 namespace mozilla::dom {
11 class MIDIMessage;
13 /**
14 * Set of utility functions for dealing with MIDI Messages.
17 namespace MIDIUtils {
19 // Takes a nsTArray of bytes and parses it into zero or more MIDI messages.
20 // Returns true if no errors were encountered, false otherwise.
21 bool ParseMessages(const nsTArray<uint8_t>& aByteBuffer,
22 const TimeStamp& aTimestamp,
23 nsTArray<MIDIMessage>& aMsgArray);
24 // Returns true if a message is a sysex message.
25 bool IsSysexMessage(const MIDIMessage& a);
26 } // namespace MIDIUtils
27 } // namespace mozilla::dom