summaryrefslogtreecommitdiff
path: root/node_modules/prism-media/typings/index.d.ts
blob: 6440cc2a89b245f254f652766f892ff867a54c6b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
import { Transform } from 'stream';

import { ChildProcess } from 'child_process';
import { Duplex } from 'stream';

import { opus } from './opus';
import { vorbis } from './vorbis';

export interface FFmpegOptions {
  args?: string[];
}

export interface FFmpegInfo {
  command: string;
  info: string;
  version: string;
}

export class FFmpeg extends Duplex {
  public process: ChildProcess;
  constructor(options?: FFmpegOptions);
  static getInfo(force?: boolean): FFmpegInfo;
}

export interface VolumeOptions {
  type: 's16le' | 's16be' | 's32le' | 's32be',
  volume?: number
}

export class VolumeTransformer {
  public volume: number;

  constructor(options: VolumeOptions);
  public setVolume(volume: number): void;
  public setVolumeDecibels(db: number): void;
  public setVolumeLogarithmic(value: number): void;
  public readonly volumeDecibels: number;
  public readonly volumeLogarithmic: number;
}

export { opus, vorbis };