Newer
Older
minerva / Userland / Libraries / LibWeb / WebAudio / AudioBufferSourceNode.idl
@minerva minerva on 13 Jul 902 bytes Initial commit
#import <WebAudio/AudioBuffer.idl>
#import <WebAudio/AudioParam.idl>
#import <WebAudio/AudioScheduledSourceNode.idl>
#import <WebAudio/BaseAudioContext.idl>

dictionary AudioBufferSourceOptions {
    AudioBuffer? buffer;
    float detune = 0;
    boolean loop = false;
    double loopEnd = 0;
    double loopStart = 0;
    float playbackRate = 1;
};

// https://webaudio.github.io/web-audio-api/#AudioBufferSourceNode
[Exposed=Window]
interface AudioBufferSourceNode : AudioScheduledSourceNode {
    constructor(BaseAudioContext context, optional AudioBufferSourceOptions options = {});
    attribute AudioBuffer? buffer;
    readonly attribute AudioParam playbackRate;
    readonly attribute AudioParam detune;
    attribute boolean loop;
    attribute double loopStart;
    attribute double loopEnd;
    undefined start(optional double when = 0, optional double offset, optional double duration);
};