Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

94
Vistas
Web audio: Output to center speaker only

I'm playing around with the web audio context and trying to understand how the splitter node works.

I've managed to split an oscillator node and connect it to output only to the left/right channels, but I'm having some hard time outputting it to the "center" channel alone...

given the following code

    const ac = new AudioContext();
    const splitter = ac.createChannelSplitter(6);
    const oscilator = ac.createOscillator();
    const merger = ac.createChannelMerger(6);
    oscilator.frequency.value = 440;
    
    const gainNode = ac.createGain();

    // connect oscilator to splitter channel
    oscilator.connect(splitter);

    gainNode.gain.setValueAtTime(0.5, ac.currentTime);
    splitter.connect(gainNode, 0);
    gainNode.connect(merger, 0, 2);
    merger.connect(ac.destination);

    oscilator.start(0);
    oscilator.stop(1);

I expect the oscillator tune to be outputted only in my "center" speaker, but I hear the sound from both.

what am I missing?

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda