Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

107
Views
Is it more expensive to create and close web audio oscillators or to keep running and manipulate the gain?

So I have a web app I'm building that has several different possible sounds that can be triggered by a button press. Something like a radio list of options and you choose your option and then hit the play button and it plays.

previously with only 2 sources, I created the entire web audio pathway (oscillator > gain > pan > destination) and then started the oscillator and just changed the with the gain node to turn on and off different sounds. It seems like a bad idea though to have 6 web audio sources always running (but with two of them at 0 gain).

So my question is this: Is it better to run 6 sources, and toggle the gain node for the one or two I want to be on and the other two to be 0 (to "turn them off"), or is it better to start and stop the different oscillator nodes (leaving them for garbage collection) on each cycle.

In a given session, a user may create hundreds of little boops and beeps at different frequencies - so it feels like trouble to control creating and destroying each one. But at the same time, I don't want my apps performance to suffer by constantly running 6 web audio sources in the background.

Any thoughts or ideas?

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!