buddy

node MVC discord bot
Log | Files | Refs | README

opus.d.ts (774B)


      1 import { Transform } from 'stream';
      2 
      3 interface OpusOptions {
      4   frameSize: number,
      5   channels: number,
      6   rate: number
      7 }
      8 
      9 export class OpusStream extends Transform {
     10   public encoder: any; // TODO: type opusscript/node-opus
     11 
     12   constructor(options?: OpusOptions);
     13   public static readonly type: 'opusscript' | 'node-opus' | '@discordjs/opus';
     14   public setBitrate(bitrate: number): void;
     15   public setFEC(enabled: boolean): void;
     16   public setPLP(percentage: number): void;
     17 }
     18 
     19 export namespace opus {
     20   interface OpusOptions {
     21     frameSize: number,
     22     channels: number,
     23     rate: number
     24   }
     25 
     26   export class Encoder extends OpusStream {}
     27   export class Decoder extends OpusStream {}
     28   export class OggDemuxer extends Transform {}
     29   export class WebmDemuxer extends Transform {}
     30 }