Revered the audio system back to PortAudio
This commit is contained in:
@@ -63,7 +63,9 @@ namespace audio.player {
|
||||
console.warn("Main audio underflow");
|
||||
};
|
||||
|
||||
_audioContext = new AudioContext();
|
||||
_audioContext = new AudioContext({
|
||||
sampleRate: _output_stream.sample_rate
|
||||
});
|
||||
_processor = _audioContext.createScriptProcessor(1024 * 8, _output_stream.channels, _output_stream.channels);
|
||||
|
||||
_processor.onaudioprocess = function(event) {
|
||||
|
||||
@@ -10,6 +10,7 @@ export namespace _audio.recorder {
|
||||
|
||||
interface NativeDevice extends InputDevice {
|
||||
device_index: number;
|
||||
native: any;
|
||||
}
|
||||
|
||||
let _device_cache: NativeDevice[] = undefined;
|
||||
@@ -26,6 +27,7 @@ export namespace _audio.recorder {
|
||||
name: e.name,
|
||||
driver: e.driver,
|
||||
sample_rate: 48000, /* TODO! */
|
||||
native: e
|
||||
} as NativeDevice
|
||||
}));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user