dom/media/webaudio/AudioScheduledSourceNode.h
author Iulian Moraru <imoraru@mozilla.com>
Sat, 10 Dec 2022 00:13:30 +0200
changeset 645198 c5346fa57f5c70e9c5a35cf233b28dcc55954c5d
parent 616742 4c52f09cdd8efb0329b8762b40fb1843d5a32c9f
permissions -rw-r--r--
Backed out changeset 5687d0e50d11 (bug 1752089) as per John Schanck's request and for causing Bug 1804979. a=backout

/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim:set ts=2 sw=2 sts=2 et cindent: */
/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */

#ifndef AudioScheduledSourceNode_h_
#define AudioScheduledSourceNode_h_

#include "AudioNode.h"
#include "mozilla/dom/AudioScheduledSourceNodeBinding.h"

namespace mozilla::dom {

class AudioContext;

class AudioScheduledSourceNode : public AudioNode {
 public:
  virtual void Start(double aWhen, ErrorResult& aRv) = 0;
  virtual void Stop(double aWhen, ErrorResult& aRv) = 0;

  IMPL_EVENT_HANDLER(ended)

 protected:
  AudioScheduledSourceNode(AudioContext* aContext, uint32_t aChannelCount,
                           ChannelCountMode aChannelCountMode,
                           ChannelInterpretation aChannelInterpretation);
  virtual ~AudioScheduledSourceNode() = default;
};

}  // namespace mozilla::dom

#endif