connorchristie / audio-mixer Goto Github PK
View Code? Open in Web Editor NEWAllows mixing of PCM audio streams.
Allows mixing of PCM audio streams.
The /dist folder that contains the Javascript source is in the gitignore
Hi, i've been using audio-mixer in my recent project and noticed 100% audio usage.
The use case where i noticed this is :
This test case also has this problem :
You could think that it would be caused by too many streams, but actually even this test case works:
When using the profiler, i'm noticing 99% cpu usage for calls to epoll_pwait
in c++ wrapper.
I'm guessing this has to do with the usage of ffmpeg ? Is mixer always encoding even when there is no input ? I hope you can help with this :)
This probably isn't a bug, but I am not able to get this process to work. I'm trying to mix a variable number of pcm files into one output file from the command line. Here's the mixing stream code. Node does get to the end of this, but then just pauses and doesn't end the script/process. Am I missing a command to "finish" the process?
const mixer = new AudioMixer.Mixer({
channels: 1,
bitDepth: 16,
sampleRate: 16000,
});
for (const filename of inFilenames) {
const fileStream = fs.createReadStream(filename);
const input = mixer.input({
channels: 1,
volume: 75,
});
fileStream.pipe(input);
}
const write = fs.createWriteStream(outFilename);
mixer.pipe(write);
Input
just internally buffers its data as soon as it gets it. Mixer
also calls this.push
without checking the return value for backpressure.
Both of these would need to change to respect backpressure.
Can i use this library with discord.js voice receiver?
Having a volume of 0 will set the volume of 100:
volume: args.volume || 100
I am working around it now by using
const VOLUME_ZERO = 0.0000001
Hello, I am struggling with a problem and would really like some help!
I have a Writable
stream as destination and I gather the mixed data by implementing a custom _write()
function.
My goal is to send this data to any connected client (browser based) and play them as audio using web-audio.
(The part where I send the data to the clients is working)
What I can't figure out is in what form to have the output data in order for them to be playable using web audio.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.