Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updating stream object to support multichannel audio #52

Open
stevenrick opened this issue Feb 15, 2022 · 2 comments
Open

Updating stream object to support multichannel audio #52

stevenrick opened this issue Feb 15, 2022 · 2 comments
Labels
enhancement New feature or request

Comments

@stevenrick
Copy link
Member

stevenrick commented Feb 15, 2022

Currently the application only records a single channel of audio per stream (whether or not video is present and whether or not the device supports more than one channel)

In order to produce more lossless data we should update the way we handle audio constraints to record all available channels (or give the user the ability to record all available channels?)

To verify this can hardcode channelCount: 2, into constraints and will update recording to stereo if supported

Our solution should be device capability aware - so can use something like
var microphone = this.#audioContext.createMediaStreamSource(stream); and then microphone.channelCount); in monitorAudio() to get the reported number of channels available.

More information on web audio api documentation available at MDN

@stevenrick stevenrick added the enhancement New feature or request label Feb 15, 2022
@stevenrick
Copy link
Member Author

Adding more details here after exploring with a multichannel (more than 2) audio input device. It seems the basic mediaDevice objects supported by Chrome / Node.js only supports exposing 2-channels. It seems the best route forward would be using something like naudiodon which is a cross-platform library for accessing PortAudio

@stevenrick
Copy link
Member Author

closing #51 because this can address it in parallel
link to old code using naudiodon

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant