AudioBuffer.idl 953 B

1234567891011121314151617181920212223
  1. // https://webaudio.github.io/web-audio-api/#AudioBufferOptions
  2. dictionary AudioBufferOptions {
  3. unsigned long numberOfChannels = 1;
  4. required unsigned long length;
  5. required float sampleRate;
  6. };
  7. // https://webaudio.github.io/web-audio-api/#AudioBuffer
  8. [Exposed=Window]
  9. interface AudioBuffer {
  10. constructor (AudioBufferOptions options);
  11. readonly attribute float sampleRate;
  12. readonly attribute unsigned long length;
  13. readonly attribute double duration;
  14. readonly attribute unsigned long numberOfChannels;
  15. Float32Array getChannelData(unsigned long channel);
  16. undefined copyFromChannel(Float32Array destination,
  17. unsigned long channelNumber,
  18. optional unsigned long bufferOffset = 0);
  19. undefined copyToChannel(Float32Array source,
  20. unsigned long channelNumber,
  21. optional unsigned long bufferOffset = 0);
  22. };