|
|
|
|
|
|
|
|
this.channelDataLength = 440; |
|
|
this.channelDataLength = 440; |
|
|
this.sampleRate = 22050; |
|
|
this.sampleRate = 22050; |
|
|
this.numberOfChannels = 1; |
|
|
this.numberOfChannels = 1; |
|
|
|
|
|
this.init = false; |
|
|
this.src = |
|
|
this.src = |
|
|
'chrome-extension://<id>/nativeTransferableStream.html'; |
|
|
'chrome-extension://<id>/nativeTransferableStream.html'; |
|
|
this.ac = new AudioContext({ |
|
|
this.ac = new AudioContext({ |
|
|
|
|
|
|
|
|
this.stdout.pipeTo( |
|
|
this.stdout.pipeTo( |
|
|
new WritableStream({ |
|
|
new WritableStream({ |
|
|
write: async (value, c) => { |
|
|
write: async (value, c) => { |
|
|
for ( |
|
|
|
|
|
let i = 0; |
|
|
|
|
|
|
|
|
let i = 0; |
|
|
|
|
|
if (!this.init) { |
|
|
|
|
|
this.init = true; |
|
|
|
|
|
i = 44; |
|
|
|
|
|
} |
|
|
|
|
|
for (; |
|
|
i < value.buffer.byteLength; |
|
|
i < value.buffer.byteLength; |
|
|
i++, this.readOffset++ |
|
|
i++, this.readOffset++ |
|
|
) { |
|
|
) { |