* Creates a new AudioDecoder.
(init: AudioDecoderInit)
| 55 | * Creates a new AudioDecoder. |
| 56 | */ |
| 57 | constructor(init: AudioDecoderInit) { |
| 58 | super(); |
| 59 | |
| 60 | if (!init.output || !init.error) { |
| 61 | throw new TypeError('AudioDecoderInit requires \'output\' and \'error\' callbacks.'); |
| 62 | } |
| 63 | |
| 64 | this.init = init; |
| 65 | this.frame = new Frame(); |
| 66 | this.frame.alloc(); |
| 67 | this.packet = new Packet(); |
| 68 | this.packet.alloc(); |
| 69 | } |
| 70 | |
| 71 | private static createCodecContext(config: AudioDecoderConfig) { |
| 72 | const inferred = inferCodecFromCodecString(config.codec); |
nothing calls this directly
no outgoing calls
no test coverage detected