2018-09-13 23:04:55 +03:00
|
|
|
/* -*- Mode: IDL; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
2013-05-17 03:30:41 +04:00
|
|
|
/* 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/.
|
|
|
|
*
|
|
|
|
* The origin of this IDL file is
|
2016-06-29 12:30:13 +03:00
|
|
|
* https://webaudio.github.io/web-audio-api/
|
2013-05-17 03:30:41 +04:00
|
|
|
*
|
|
|
|
* Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
|
|
|
|
* liability, trademark and document use rules apply.
|
|
|
|
*/
|
|
|
|
|
2017-08-09 05:55:43 +03:00
|
|
|
dictionary OfflineAudioContextOptions {
|
|
|
|
unsigned long numberOfChannels = 1;
|
|
|
|
required unsigned long length;
|
|
|
|
required float sampleRate;
|
|
|
|
};
|
|
|
|
|
|
|
|
[Constructor (OfflineAudioContextOptions contextOptions),
|
|
|
|
Constructor(unsigned long numberOfChannels, unsigned long length, float sampleRate),
|
2016-07-22 14:59:52 +03:00
|
|
|
Pref="dom.webaudio.enabled"]
|
2016-12-21 12:52:50 +03:00
|
|
|
interface OfflineAudioContext : BaseAudioContext {
|
2013-05-17 03:30:41 +04:00
|
|
|
|
2013-09-16 09:14:45 +04:00
|
|
|
[Throws]
|
2014-11-19 13:38:39 +03:00
|
|
|
Promise<AudioBuffer> startRendering();
|
2013-05-17 03:30:41 +04:00
|
|
|
|
2016-12-21 12:52:50 +03:00
|
|
|
// TODO: Promise<void> suspend (double suspendTime);
|
2013-05-17 03:30:41 +04:00
|
|
|
|
2016-12-21 12:52:50 +03:00
|
|
|
readonly attribute unsigned long length;
|
|
|
|
attribute EventHandler oncomplete;
|
2013-05-17 03:30:41 +04:00
|
|
|
};
|