Closed pascalopitz closed 3 years ago
Maybe some sort of visual EQ indicator would be helpful so we know we actually capture stuff?
Yeah the visual EQ/status indicator sounds like a great idea, I'll have a look at that.
I know I managed to capture sound from my Linux machine, although just microphone audio. But I reckon that could work if you configure an ALSA loopback along with it. I'll see if I can dig up the config object I used on Linux.
There might be a solution here. haven't tried it out yet: https://github.com/electron/electron/issues/4776#issuecomment-380297550
I'm able to capture microphone input with {audio: true, video: false}
as config object.
You'll also need to modify the handleStream function at https://github.com/filahf/budgie-stream/blob/master/budgie-stream/src/utils/recorder.js#L39 to:
const handleStream = (stream) => {
̶ ̶c̶o̶n̶s̶t̶ ̶a̶u̶d̶i̶o̶T̶r̶a̶c̶k̶ ̶=̶ ̶n̶e̶w̶ ̶M̶e̶d̶i̶a̶S̶t̶r̶e̶a̶m̶(̶[̶s̶t̶r̶e̶a̶m̶.̶g̶e̶t̶T̶r̶a̶c̶k̶s̶(̶)̶[̶0̶]̶]̶)̶;̶
var audioInput = context.createMediaStreamSource(stream);
var bufferSize = 2048;
// create a javascript node
var recorder = context.createScriptProcessor(bufferSize, 1, 1);
// specify the processing function
recorder.onaudioprocess = recorderProcess;
// connect stream to our recorder
audioInput.connect(recorder);
// connect our recorder to the previous destination
recorder.connect(context.destination);
};
Can't get this to work on Linux:
I tried passing different config object, with
audio: true
but it doesn't seem to capture anything.