Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

102
Visualizações
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
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda