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

audio seems skipped and choppy #176

Closed
z-sanjivini opened this issue Dec 7, 2018 · 6 comments · Fixed by #212
Closed

audio seems skipped and choppy #176

z-sanjivini opened this issue Dec 7, 2018 · 6 comments · Fixed by #212

Comments

@z-sanjivini
Copy link

z-sanjivini commented Dec 7, 2018

Tried implementing the code. But when running on a windows 10 machine the audio seems to be choppy at points. I also tried monitoring the CPU utilisation and it went from 18% when running the application to 36% at maximum.

@z-sanjivini z-sanjivini changed the title audio weird audio seems skipped and choppy Dec 7, 2018
@chris-rudmin
Copy link
Owner

@SanjiviniAhuja Any performance optimizations you wish to contribute are very welcome!

@z-sanjivini
Copy link
Author

I was hoping to get some insights into why the audio is choppy at times. On playback it sounds as if someone hits the mute button for a fraction of second and then resumes. Like there were cuts in the audio while recording.

@chris-rudmin
Copy link
Owner

@SanjiviniAhuja I might be able to provide a reasonable hypothesis if I can know what Browser, OS, Machine specs, Sample Rate, Recording length and Recording configuration can reliably reproduce the issue.

@z-sanjivini
Copy link
Author

I am not able to reproduce the issue every time, so I'm not sure how successful you might be in that attempt but I'm using
Firefox 63.0 Chrome 70.0
Windows 10, 8GB Ram, 2.6GHz
Sample Rate and other Audio related specs are the same as given in the sample.

@chris-rudmin
Copy link
Owner

chris-rudmin commented Dec 19, 2018

My guess would be that your audio dropouts are related to our use of scriptProcessorNode which uses the main thread to pass audio buffers to the encoder. If your webpage has some code running in the main thread, it could result in blocking/delaying the event loop for processing the audio buffers which could result in dropped audio. Also, this problem is exacerbated with higher Input Device Sample Rates.

@chris-rudmin
Copy link
Owner

If this is the case, it will be fixed when we implement #111

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

Successfully merging a pull request may close this issue.

2 participants