Fixed disturbed audio for opus voice
parent
18bfd8f7ec
commit
12860ef3ac
|
@ -72,6 +72,10 @@
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
justify-content: stretch;
|
justify-content: stretch;
|
||||||
|
|
||||||
|
&:not(:first-of-type) {
|
||||||
|
margin-top: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
div {
|
div {
|
||||||
flex-grow: 0;
|
flex-grow: 0;
|
||||||
|
|
||||||
|
|
|
@ -69,7 +69,7 @@ class CodecWrapper extends BasicCodec {
|
||||||
let audioBuf = this._audioContext.createBuffer(this.channelCount, array.length / this.channelCount, this._codecSampleRate);
|
let audioBuf = this._audioContext.createBuffer(this.channelCount, array.length / this.channelCount, this._codecSampleRate);
|
||||||
for (let channel = 0; channel < this.channelCount; channel++) {
|
for (let channel = 0; channel < this.channelCount; channel++) {
|
||||||
for (let offset = 0; offset < audioBuf.length; offset++) {
|
for (let offset = 0; offset < audioBuf.length; offset++) {
|
||||||
audioBuf.getChannelData(channel)[offset] = array[channel + offset * 2];
|
audioBuf.getChannelData(channel)[offset] = array[channel + offset * this.channelCount];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
resolve(audioBuf);
|
resolve(audioBuf);
|
||||||
|
|
|
@ -65,7 +65,7 @@ namespace sound {
|
||||||
node?: HTMLAudioElement;
|
node?: HTMLAudioElement;
|
||||||
|
|
||||||
}
|
}
|
||||||
let warned = false
|
let warned = false;
|
||||||
let speech_mapping: {[key: string]:SpeechFile} = {};
|
let speech_mapping: {[key: string]:SpeechFile} = {};
|
||||||
|
|
||||||
function register_sound(key: string, file: string) {
|
function register_sound(key: string, file: string) {
|
||||||
|
|
Loading…
Reference in New Issue