Web Audio Api destination maxChannelCount always is 2 on Linux The Next CEO of Stack OverflowHow do I prompt for Yes/No/Cancel input in a Linux shell script?How to symlink a file in Linux?How do I change permissions for a folder and all of its subfolders and files in one step in Linux?How to change the output color of echo in LinuxHow can I use grep to show just filenames on Linux?Playing audio with Javascript?How do I copy folder with files to another folder in Unix/Linux?How do I find all files containing specific text on Linux?Why does the C preprocessor interpret the word “linux” as the constant “1”?Connect multiple sound card inputs using the Web Audio API

How powerful is the invisibility granted by the Gloom Stalker ranger's Umbral Sight feature?

What benefits would be gained by using human laborers instead of drones in deep sea mining?

Bold, vivid family

Non-deterministic sum of floats

Why am I allowed to create multiple unique pointers from a single object?

Example of a Mathematician/Physicist whose Other Publications during their PhD eclipsed their PhD Thesis

What was the first Unix version to run on a microcomputer?

How did the Bene Gesserit know how to make a Kwisatz Haderach?

Is it possible to search for a directory/file combination?

If Nick Fury and Coulson already knew about aliens (Kree and Skrull) why did they wait until Thor's appearance to start making weapons?

Why has the US not been more assertive in confronting Russia in recent years?

Why does the UK parliament need a vote on the political declaration?

What happens if you roll doubles 3 times then land on "Go to jail?"

What is "(CFMCC)" on an ILS approach chart?

Which kind of appliances can one connect to electric sockets located in a airplane's toilet?

Is it ever safe to open a suspicious html file (e.g. email attachment)?

How do I make a variable always equal to the result of some calculations?

What connection does MS Office have to Netscape Navigator?

Can I equip Skullclamp on a creature I am sacrificing?

How do we know the LHC results are robust?

Is micro rebar a better way to reinforce concrete than rebar?

Won the lottery - how do I keep the money?

How to count occurrences of text in a file?

If/When UK leaves the EU, can a future goverment conduct a referendum to join the EU?



Web Audio Api destination maxChannelCount always is 2 on Linux



The Next CEO of Stack OverflowHow do I prompt for Yes/No/Cancel input in a Linux shell script?How to symlink a file in Linux?How do I change permissions for a folder and all of its subfolders and files in one step in Linux?How to change the output color of echo in LinuxHow can I use grep to show just filenames on Linux?Playing audio with Javascript?How do I copy folder with files to another folder in Unix/Linux?How do I find all files containing specific text on Linux?Why does the C preprocessor interpret the word “linux” as the constant “1”?Connect multiple sound card inputs using the Web Audio API










0















I have a problem with Web Audio API and an usb audio interface on Linux;



I wrote some audio player code on Web Audio API.



Everything is alright when I connect my 7.1 USB Audio Interface (TASCAM 16x08 - there are 8 output channels) and start my APP on Windows machine. context.destination.maxChannelCount equals 8 and I can select the channel to output the sound.



But when I do the same on Linux machine context.destination.maxChannelCount always is 2 (stereo).



I tried to:



  • create virtual audio multichannel device = same result - always only 2 maxChannelCount;

  • setting alsa, pulseaudio, jack audio connection kit and more...

The result is the same: in my code context.destination.maxChannelCount is always is 2
but the operating systems settings dialog detects 8 channels.



This is some code to be clear:



var context = new (window.AudioContext || window.webkitAudioContext)();
var audio = new Audio();
var source = context.createMediaElementSource(audio);
source.connect(context.destination);
audio.src = 'audio.mp3';
audio.play();

console.log(context.destination.maxChannelCount); //output on win: 2
on linux: 8


What can be the problem?










share|improve this question




























    0















    I have a problem with Web Audio API and an usb audio interface on Linux;



    I wrote some audio player code on Web Audio API.



    Everything is alright when I connect my 7.1 USB Audio Interface (TASCAM 16x08 - there are 8 output channels) and start my APP on Windows machine. context.destination.maxChannelCount equals 8 and I can select the channel to output the sound.



    But when I do the same on Linux machine context.destination.maxChannelCount always is 2 (stereo).



    I tried to:



    • create virtual audio multichannel device = same result - always only 2 maxChannelCount;

    • setting alsa, pulseaudio, jack audio connection kit and more...

    The result is the same: in my code context.destination.maxChannelCount is always is 2
    but the operating systems settings dialog detects 8 channels.



    This is some code to be clear:



    var context = new (window.AudioContext || window.webkitAudioContext)();
    var audio = new Audio();
    var source = context.createMediaElementSource(audio);
    source.connect(context.destination);
    audio.src = 'audio.mp3';
    audio.play();

    console.log(context.destination.maxChannelCount); //output on win: 2
    on linux: 8


    What can be the problem?










    share|improve this question


























      0












      0








      0








      I have a problem with Web Audio API and an usb audio interface on Linux;



      I wrote some audio player code on Web Audio API.



      Everything is alright when I connect my 7.1 USB Audio Interface (TASCAM 16x08 - there are 8 output channels) and start my APP on Windows machine. context.destination.maxChannelCount equals 8 and I can select the channel to output the sound.



      But when I do the same on Linux machine context.destination.maxChannelCount always is 2 (stereo).



      I tried to:



      • create virtual audio multichannel device = same result - always only 2 maxChannelCount;

      • setting alsa, pulseaudio, jack audio connection kit and more...

      The result is the same: in my code context.destination.maxChannelCount is always is 2
      but the operating systems settings dialog detects 8 channels.



      This is some code to be clear:



      var context = new (window.AudioContext || window.webkitAudioContext)();
      var audio = new Audio();
      var source = context.createMediaElementSource(audio);
      source.connect(context.destination);
      audio.src = 'audio.mp3';
      audio.play();

      console.log(context.destination.maxChannelCount); //output on win: 2
      on linux: 8


      What can be the problem?










      share|improve this question
















      I have a problem with Web Audio API and an usb audio interface on Linux;



      I wrote some audio player code on Web Audio API.



      Everything is alright when I connect my 7.1 USB Audio Interface (TASCAM 16x08 - there are 8 output channels) and start my APP on Windows machine. context.destination.maxChannelCount equals 8 and I can select the channel to output the sound.



      But when I do the same on Linux machine context.destination.maxChannelCount always is 2 (stereo).



      I tried to:



      • create virtual audio multichannel device = same result - always only 2 maxChannelCount;

      • setting alsa, pulseaudio, jack audio connection kit and more...

      The result is the same: in my code context.destination.maxChannelCount is always is 2
      but the operating systems settings dialog detects 8 channels.



      This is some code to be clear:



      var context = new (window.AudioContext || window.webkitAudioContext)();
      var audio = new Audio();
      var source = context.createMediaElementSource(audio);
      source.connect(context.destination);
      audio.src = 'audio.mp3';
      audio.play();

      console.log(context.destination.maxChannelCount); //output on win: 2
      on linux: 8


      What can be the problem?







      linux electron html5-audio web-audio-api






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Mar 7 at 15:32









      kalehmann

      2,7331023




      2,7331023










      asked Mar 7 at 15:22









      EvgenyEvgeny

      1




      1






















          2 Answers
          2






          active

          oldest

          votes


















          0














          What browser are you running? Browser is responsible for giving you those available outputs, if they're not there (in all available browsers) then i think you're out of luck. I have done some things with Web Audio and multiple outputs and even on the same OS i got different results from different browsers.






          share|improve this answer























          • I use electron js - my browser is Chromium. It`s looks like Chromium in linux can not detect device channel count and set it for 2 as default

            – Evgeny
            Mar 7 at 16:37












          • Try and see what number of outputs you get in different browsers on linux. I assume you have that audio interface working correctly in linux? as in you have somewhere in the OS saying that you have 8 outputs available?

            – Eindbaas
            Mar 7 at 16:40











          • It can be Chromium, but can also be something else. Does your OS say you have 8 outputs?

            – Eindbaas
            Mar 7 at 16:43


















          0














          I found solution here https://ubuntuforums.org/archive/index.php/t-1072792.html




          solved it by editing /etc/pulse/daemon.conf.
          ; default-sample-channels
          = 2 uncomment the line and add more channels.







          share|improve this answer























            Your Answer






            StackExchange.ifUsing("editor", function ()
            StackExchange.using("externalEditor", function ()
            StackExchange.using("snippets", function ()
            StackExchange.snippets.init();
            );
            );
            , "code-snippets");

            StackExchange.ready(function()
            var channelOptions =
            tags: "".split(" "),
            id: "1"
            ;
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function()
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled)
            StackExchange.using("snippets", function()
            createEditor();
            );

            else
            createEditor();

            );

            function createEditor()
            StackExchange.prepareEditor(
            heartbeatType: 'answer',
            autoActivateHeartbeat: false,
            convertImagesToLinks: true,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            bindNavPrevention: true,
            postfix: "",
            imageUploader:
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            ,
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            );



            );













            draft saved

            draft discarded


















            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55047267%2fweb-audio-api-destination-maxchannelcount-always-is-2-on-linux%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown

























            2 Answers
            2






            active

            oldest

            votes








            2 Answers
            2






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            0














            What browser are you running? Browser is responsible for giving you those available outputs, if they're not there (in all available browsers) then i think you're out of luck. I have done some things with Web Audio and multiple outputs and even on the same OS i got different results from different browsers.






            share|improve this answer























            • I use electron js - my browser is Chromium. It`s looks like Chromium in linux can not detect device channel count and set it for 2 as default

              – Evgeny
              Mar 7 at 16:37












            • Try and see what number of outputs you get in different browsers on linux. I assume you have that audio interface working correctly in linux? as in you have somewhere in the OS saying that you have 8 outputs available?

              – Eindbaas
              Mar 7 at 16:40











            • It can be Chromium, but can also be something else. Does your OS say you have 8 outputs?

              – Eindbaas
              Mar 7 at 16:43















            0














            What browser are you running? Browser is responsible for giving you those available outputs, if they're not there (in all available browsers) then i think you're out of luck. I have done some things with Web Audio and multiple outputs and even on the same OS i got different results from different browsers.






            share|improve this answer























            • I use electron js - my browser is Chromium. It`s looks like Chromium in linux can not detect device channel count and set it for 2 as default

              – Evgeny
              Mar 7 at 16:37












            • Try and see what number of outputs you get in different browsers on linux. I assume you have that audio interface working correctly in linux? as in you have somewhere in the OS saying that you have 8 outputs available?

              – Eindbaas
              Mar 7 at 16:40











            • It can be Chromium, but can also be something else. Does your OS say you have 8 outputs?

              – Eindbaas
              Mar 7 at 16:43













            0












            0








            0







            What browser are you running? Browser is responsible for giving you those available outputs, if they're not there (in all available browsers) then i think you're out of luck. I have done some things with Web Audio and multiple outputs and even on the same OS i got different results from different browsers.






            share|improve this answer













            What browser are you running? Browser is responsible for giving you those available outputs, if they're not there (in all available browsers) then i think you're out of luck. I have done some things with Web Audio and multiple outputs and even on the same OS i got different results from different browsers.







            share|improve this answer












            share|improve this answer



            share|improve this answer










            answered Mar 7 at 15:51









            EindbaasEindbaas

            369415




            369415












            • I use electron js - my browser is Chromium. It`s looks like Chromium in linux can not detect device channel count and set it for 2 as default

              – Evgeny
              Mar 7 at 16:37












            • Try and see what number of outputs you get in different browsers on linux. I assume you have that audio interface working correctly in linux? as in you have somewhere in the OS saying that you have 8 outputs available?

              – Eindbaas
              Mar 7 at 16:40











            • It can be Chromium, but can also be something else. Does your OS say you have 8 outputs?

              – Eindbaas
              Mar 7 at 16:43

















            • I use electron js - my browser is Chromium. It`s looks like Chromium in linux can not detect device channel count and set it for 2 as default

              – Evgeny
              Mar 7 at 16:37












            • Try and see what number of outputs you get in different browsers on linux. I assume you have that audio interface working correctly in linux? as in you have somewhere in the OS saying that you have 8 outputs available?

              – Eindbaas
              Mar 7 at 16:40











            • It can be Chromium, but can also be something else. Does your OS say you have 8 outputs?

              – Eindbaas
              Mar 7 at 16:43
















            I use electron js - my browser is Chromium. It`s looks like Chromium in linux can not detect device channel count and set it for 2 as default

            – Evgeny
            Mar 7 at 16:37






            I use electron js - my browser is Chromium. It`s looks like Chromium in linux can not detect device channel count and set it for 2 as default

            – Evgeny
            Mar 7 at 16:37














            Try and see what number of outputs you get in different browsers on linux. I assume you have that audio interface working correctly in linux? as in you have somewhere in the OS saying that you have 8 outputs available?

            – Eindbaas
            Mar 7 at 16:40





            Try and see what number of outputs you get in different browsers on linux. I assume you have that audio interface working correctly in linux? as in you have somewhere in the OS saying that you have 8 outputs available?

            – Eindbaas
            Mar 7 at 16:40













            It can be Chromium, but can also be something else. Does your OS say you have 8 outputs?

            – Eindbaas
            Mar 7 at 16:43





            It can be Chromium, but can also be something else. Does your OS say you have 8 outputs?

            – Eindbaas
            Mar 7 at 16:43













            0














            I found solution here https://ubuntuforums.org/archive/index.php/t-1072792.html




            solved it by editing /etc/pulse/daemon.conf.
            ; default-sample-channels
            = 2 uncomment the line and add more channels.







            share|improve this answer



























              0














              I found solution here https://ubuntuforums.org/archive/index.php/t-1072792.html




              solved it by editing /etc/pulse/daemon.conf.
              ; default-sample-channels
              = 2 uncomment the line and add more channels.







              share|improve this answer

























                0












                0








                0







                I found solution here https://ubuntuforums.org/archive/index.php/t-1072792.html




                solved it by editing /etc/pulse/daemon.conf.
                ; default-sample-channels
                = 2 uncomment the line and add more channels.







                share|improve this answer













                I found solution here https://ubuntuforums.org/archive/index.php/t-1072792.html




                solved it by editing /etc/pulse/daemon.conf.
                ; default-sample-channels
                = 2 uncomment the line and add more channels.








                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Mar 8 at 8:31









                EvgenyEvgeny

                1




                1



























                    draft saved

                    draft discarded
















































                    Thanks for contributing an answer to Stack Overflow!


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid


                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.

                    To learn more, see our tips on writing great answers.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function ()
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55047267%2fweb-audio-api-destination-maxchannelcount-always-is-2-on-linux%23new-answer', 'question_page');

                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    Popular posts from this blog

                    1928 у кіно

                    Захаров Федір Захарович

                    Ель Греко