Send sound output to application and speaker

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP












1















I'm using my Ubuntu 14.04 LTS Laptop toplay music at a party. I'm using Mixxx and is performs very well for that task. Now I'd like to add some light effects and plan to use Qlcplus for that. So I need to send the sound from Mixxx to the soundcard and Qlcplus.



I've managed to configure Mixxx to send sound to the ALSA loopback and recover it from there in Qlcplus. But then I have no sound output. How can I route sound from the ALSA loopback to speakers ?










share|improve this question






















  • Please bechmark between QLCplus and PortAudio , maybe you choose PortAudio....

    – PersianGulf
    Dec 23 '14 at 23:26











  • I'm confused, portaudio is an audio library and qlcplus is a stage light control application. How can I benchmark a library against an application ?

    – markus_b
    Dec 24 '14 at 8:59















1















I'm using my Ubuntu 14.04 LTS Laptop toplay music at a party. I'm using Mixxx and is performs very well for that task. Now I'd like to add some light effects and plan to use Qlcplus for that. So I need to send the sound from Mixxx to the soundcard and Qlcplus.



I've managed to configure Mixxx to send sound to the ALSA loopback and recover it from there in Qlcplus. But then I have no sound output. How can I route sound from the ALSA loopback to speakers ?










share|improve this question






















  • Please bechmark between QLCplus and PortAudio , maybe you choose PortAudio....

    – PersianGulf
    Dec 23 '14 at 23:26











  • I'm confused, portaudio is an audio library and qlcplus is a stage light control application. How can I benchmark a library against an application ?

    – markus_b
    Dec 24 '14 at 8:59













1












1








1


0






I'm using my Ubuntu 14.04 LTS Laptop toplay music at a party. I'm using Mixxx and is performs very well for that task. Now I'd like to add some light effects and plan to use Qlcplus for that. So I need to send the sound from Mixxx to the soundcard and Qlcplus.



I've managed to configure Mixxx to send sound to the ALSA loopback and recover it from there in Qlcplus. But then I have no sound output. How can I route sound from the ALSA loopback to speakers ?










share|improve this question














I'm using my Ubuntu 14.04 LTS Laptop toplay music at a party. I'm using Mixxx and is performs very well for that task. Now I'd like to add some light effects and plan to use Qlcplus for that. So I need to send the sound from Mixxx to the soundcard and Qlcplus.



I've managed to configure Mixxx to send sound to the ALSA loopback and recover it from there in Qlcplus. But then I have no sound output. How can I route sound from the ALSA loopback to speakers ?







audio alsa






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Dec 23 '14 at 16:58









markus_bmarkus_b

5711511




5711511












  • Please bechmark between QLCplus and PortAudio , maybe you choose PortAudio....

    – PersianGulf
    Dec 23 '14 at 23:26











  • I'm confused, portaudio is an audio library and qlcplus is a stage light control application. How can I benchmark a library against an application ?

    – markus_b
    Dec 24 '14 at 8:59

















  • Please bechmark between QLCplus and PortAudio , maybe you choose PortAudio....

    – PersianGulf
    Dec 23 '14 at 23:26











  • I'm confused, portaudio is an audio library and qlcplus is a stage light control application. How can I benchmark a library against an application ?

    – markus_b
    Dec 24 '14 at 8:59
















Please bechmark between QLCplus and PortAudio , maybe you choose PortAudio....

– PersianGulf
Dec 23 '14 at 23:26





Please bechmark between QLCplus and PortAudio , maybe you choose PortAudio....

– PersianGulf
Dec 23 '14 at 23:26













I'm confused, portaudio is an audio library and qlcplus is a stage light control application. How can I benchmark a library against an application ?

– markus_b
Dec 24 '14 at 8:59





I'm confused, portaudio is an audio library and qlcplus is a stage light control application. How can I benchmark a library against an application ?

– markus_b
Dec 24 '14 at 8:59










1 Answer
1






active

oldest

votes


















0














After lots of searching I've found the answer to my question. You need to appropriately configure ALSA and it will provide a new device which duplicates sound sent to it to two or more devices like soundcards and the loopback device.



Here the .asoundrc file I use:



# If you want this to be the default, then you
# need to override the default device and provide
# a playback path to the CardAndLoop and a capture
# path to whatever soundcard you have (here the 1st card)
#pcm.!default
# type asym
# playback.pcm "CardAndLoop"
# capture.pcm "hw:0,0"
#

# This is the interface you use for sound output
# It will send the output to the soundcard and loopback device
pcm.CardAndLoop
type plug
slave.pcm MultiCh
route_policy "duplicate"


# Virtual multichannel device with four channels
# two the for the soundcard, two for the loopback
pcm.MultiCh
type multi
slaves.a.pcm pcm.MixCard
slaves.a.channels 2
slaves.b.pcm pcm.MixLoopback
slaves.b.channels 2
bindings.0.slave a
bindings.0.channel 0
bindings.1.slave a
bindings.1.channel 1
bindings.2.slave b
bindings.2.channel 0
bindings.3.slave b
bindings.3.channel 1


# Mixer for the soundcard
pcm.MixCard
type dmix
ipc_key 1024
slave
# pcm "hw:Conectiv,0"
pcm "hw:PCH,0"
# rate 48000
rate 44100
periods 128
period_time 0
period_size 1024 # must be power of 2
buffer_size 8192



# Mixer for the loopback
pcm.MixLoopback
type dmix
ipc_key 1025
slave
pcm "hw:Loopback,0"
# rate 48000
rate 44100
periods 128
period_time 0
period_size 1024 # must be power of 2
buffer_size 8192




This file will provide a new ALSA sound device 'CardAndLoop'. If you choose this device in your sound application the sound will be sent to the 'PCH' sound card and the loopback device. You can start a second application and use the loopback device as input and it will obtain the sound played by the 1st application.



I used names to denominate the sound devices. These names can be taken from the /proc/asound/cards file:



$ cat /proc/asound/cards
0 [PCH ]: HDA-Intel - HDA Intel PCH
HDA Intel PCH at 0xf5330000 irq 44
2 [Loopback ]: Loopback - Loopback
Loopback 1


Have fun !






share|improve this answer






















    Your Answer








    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "106"
    ;
    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: false,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    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%2funix.stackexchange.com%2fquestions%2f175649%2fsend-sound-output-to-application-and-speaker%23new-answer', 'question_page');

    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    0














    After lots of searching I've found the answer to my question. You need to appropriately configure ALSA and it will provide a new device which duplicates sound sent to it to two or more devices like soundcards and the loopback device.



    Here the .asoundrc file I use:



    # If you want this to be the default, then you
    # need to override the default device and provide
    # a playback path to the CardAndLoop and a capture
    # path to whatever soundcard you have (here the 1st card)
    #pcm.!default
    # type asym
    # playback.pcm "CardAndLoop"
    # capture.pcm "hw:0,0"
    #

    # This is the interface you use for sound output
    # It will send the output to the soundcard and loopback device
    pcm.CardAndLoop
    type plug
    slave.pcm MultiCh
    route_policy "duplicate"


    # Virtual multichannel device with four channels
    # two the for the soundcard, two for the loopback
    pcm.MultiCh
    type multi
    slaves.a.pcm pcm.MixCard
    slaves.a.channels 2
    slaves.b.pcm pcm.MixLoopback
    slaves.b.channels 2
    bindings.0.slave a
    bindings.0.channel 0
    bindings.1.slave a
    bindings.1.channel 1
    bindings.2.slave b
    bindings.2.channel 0
    bindings.3.slave b
    bindings.3.channel 1


    # Mixer for the soundcard
    pcm.MixCard
    type dmix
    ipc_key 1024
    slave
    # pcm "hw:Conectiv,0"
    pcm "hw:PCH,0"
    # rate 48000
    rate 44100
    periods 128
    period_time 0
    period_size 1024 # must be power of 2
    buffer_size 8192



    # Mixer for the loopback
    pcm.MixLoopback
    type dmix
    ipc_key 1025
    slave
    pcm "hw:Loopback,0"
    # rate 48000
    rate 44100
    periods 128
    period_time 0
    period_size 1024 # must be power of 2
    buffer_size 8192




    This file will provide a new ALSA sound device 'CardAndLoop'. If you choose this device in your sound application the sound will be sent to the 'PCH' sound card and the loopback device. You can start a second application and use the loopback device as input and it will obtain the sound played by the 1st application.



    I used names to denominate the sound devices. These names can be taken from the /proc/asound/cards file:



    $ cat /proc/asound/cards
    0 [PCH ]: HDA-Intel - HDA Intel PCH
    HDA Intel PCH at 0xf5330000 irq 44
    2 [Loopback ]: Loopback - Loopback
    Loopback 1


    Have fun !






    share|improve this answer



























      0














      After lots of searching I've found the answer to my question. You need to appropriately configure ALSA and it will provide a new device which duplicates sound sent to it to two or more devices like soundcards and the loopback device.



      Here the .asoundrc file I use:



      # If you want this to be the default, then you
      # need to override the default device and provide
      # a playback path to the CardAndLoop and a capture
      # path to whatever soundcard you have (here the 1st card)
      #pcm.!default
      # type asym
      # playback.pcm "CardAndLoop"
      # capture.pcm "hw:0,0"
      #

      # This is the interface you use for sound output
      # It will send the output to the soundcard and loopback device
      pcm.CardAndLoop
      type plug
      slave.pcm MultiCh
      route_policy "duplicate"


      # Virtual multichannel device with four channels
      # two the for the soundcard, two for the loopback
      pcm.MultiCh
      type multi
      slaves.a.pcm pcm.MixCard
      slaves.a.channels 2
      slaves.b.pcm pcm.MixLoopback
      slaves.b.channels 2
      bindings.0.slave a
      bindings.0.channel 0
      bindings.1.slave a
      bindings.1.channel 1
      bindings.2.slave b
      bindings.2.channel 0
      bindings.3.slave b
      bindings.3.channel 1


      # Mixer for the soundcard
      pcm.MixCard
      type dmix
      ipc_key 1024
      slave
      # pcm "hw:Conectiv,0"
      pcm "hw:PCH,0"
      # rate 48000
      rate 44100
      periods 128
      period_time 0
      period_size 1024 # must be power of 2
      buffer_size 8192



      # Mixer for the loopback
      pcm.MixLoopback
      type dmix
      ipc_key 1025
      slave
      pcm "hw:Loopback,0"
      # rate 48000
      rate 44100
      periods 128
      period_time 0
      period_size 1024 # must be power of 2
      buffer_size 8192




      This file will provide a new ALSA sound device 'CardAndLoop'. If you choose this device in your sound application the sound will be sent to the 'PCH' sound card and the loopback device. You can start a second application and use the loopback device as input and it will obtain the sound played by the 1st application.



      I used names to denominate the sound devices. These names can be taken from the /proc/asound/cards file:



      $ cat /proc/asound/cards
      0 [PCH ]: HDA-Intel - HDA Intel PCH
      HDA Intel PCH at 0xf5330000 irq 44
      2 [Loopback ]: Loopback - Loopback
      Loopback 1


      Have fun !






      share|improve this answer

























        0












        0








        0







        After lots of searching I've found the answer to my question. You need to appropriately configure ALSA and it will provide a new device which duplicates sound sent to it to two or more devices like soundcards and the loopback device.



        Here the .asoundrc file I use:



        # If you want this to be the default, then you
        # need to override the default device and provide
        # a playback path to the CardAndLoop and a capture
        # path to whatever soundcard you have (here the 1st card)
        #pcm.!default
        # type asym
        # playback.pcm "CardAndLoop"
        # capture.pcm "hw:0,0"
        #

        # This is the interface you use for sound output
        # It will send the output to the soundcard and loopback device
        pcm.CardAndLoop
        type plug
        slave.pcm MultiCh
        route_policy "duplicate"


        # Virtual multichannel device with four channels
        # two the for the soundcard, two for the loopback
        pcm.MultiCh
        type multi
        slaves.a.pcm pcm.MixCard
        slaves.a.channels 2
        slaves.b.pcm pcm.MixLoopback
        slaves.b.channels 2
        bindings.0.slave a
        bindings.0.channel 0
        bindings.1.slave a
        bindings.1.channel 1
        bindings.2.slave b
        bindings.2.channel 0
        bindings.3.slave b
        bindings.3.channel 1


        # Mixer for the soundcard
        pcm.MixCard
        type dmix
        ipc_key 1024
        slave
        # pcm "hw:Conectiv,0"
        pcm "hw:PCH,0"
        # rate 48000
        rate 44100
        periods 128
        period_time 0
        period_size 1024 # must be power of 2
        buffer_size 8192



        # Mixer for the loopback
        pcm.MixLoopback
        type dmix
        ipc_key 1025
        slave
        pcm "hw:Loopback,0"
        # rate 48000
        rate 44100
        periods 128
        period_time 0
        period_size 1024 # must be power of 2
        buffer_size 8192




        This file will provide a new ALSA sound device 'CardAndLoop'. If you choose this device in your sound application the sound will be sent to the 'PCH' sound card and the loopback device. You can start a second application and use the loopback device as input and it will obtain the sound played by the 1st application.



        I used names to denominate the sound devices. These names can be taken from the /proc/asound/cards file:



        $ cat /proc/asound/cards
        0 [PCH ]: HDA-Intel - HDA Intel PCH
        HDA Intel PCH at 0xf5330000 irq 44
        2 [Loopback ]: Loopback - Loopback
        Loopback 1


        Have fun !






        share|improve this answer













        After lots of searching I've found the answer to my question. You need to appropriately configure ALSA and it will provide a new device which duplicates sound sent to it to two or more devices like soundcards and the loopback device.



        Here the .asoundrc file I use:



        # If you want this to be the default, then you
        # need to override the default device and provide
        # a playback path to the CardAndLoop and a capture
        # path to whatever soundcard you have (here the 1st card)
        #pcm.!default
        # type asym
        # playback.pcm "CardAndLoop"
        # capture.pcm "hw:0,0"
        #

        # This is the interface you use for sound output
        # It will send the output to the soundcard and loopback device
        pcm.CardAndLoop
        type plug
        slave.pcm MultiCh
        route_policy "duplicate"


        # Virtual multichannel device with four channels
        # two the for the soundcard, two for the loopback
        pcm.MultiCh
        type multi
        slaves.a.pcm pcm.MixCard
        slaves.a.channels 2
        slaves.b.pcm pcm.MixLoopback
        slaves.b.channels 2
        bindings.0.slave a
        bindings.0.channel 0
        bindings.1.slave a
        bindings.1.channel 1
        bindings.2.slave b
        bindings.2.channel 0
        bindings.3.slave b
        bindings.3.channel 1


        # Mixer for the soundcard
        pcm.MixCard
        type dmix
        ipc_key 1024
        slave
        # pcm "hw:Conectiv,0"
        pcm "hw:PCH,0"
        # rate 48000
        rate 44100
        periods 128
        period_time 0
        period_size 1024 # must be power of 2
        buffer_size 8192



        # Mixer for the loopback
        pcm.MixLoopback
        type dmix
        ipc_key 1025
        slave
        pcm "hw:Loopback,0"
        # rate 48000
        rate 44100
        periods 128
        period_time 0
        period_size 1024 # must be power of 2
        buffer_size 8192




        This file will provide a new ALSA sound device 'CardAndLoop'. If you choose this device in your sound application the sound will be sent to the 'PCH' sound card and the loopback device. You can start a second application and use the loopback device as input and it will obtain the sound played by the 1st application.



        I used names to denominate the sound devices. These names can be taken from the /proc/asound/cards file:



        $ cat /proc/asound/cards
        0 [PCH ]: HDA-Intel - HDA Intel PCH
        HDA Intel PCH at 0xf5330000 irq 44
        2 [Loopback ]: Loopback - Loopback
        Loopback 1


        Have fun !







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Dec 29 '14 at 11:18









        markus_bmarkus_b

        5711511




        5711511



























            draft saved

            draft discarded
















































            Thanks for contributing an answer to Unix & Linux Stack Exchange!


            • 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%2funix.stackexchange.com%2fquestions%2f175649%2fsend-sound-output-to-application-and-speaker%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

            How to check contact read email or not when send email to Individual?

            Displaying single band from multi-band raster using QGIS

            How many registers does an x86_64 CPU actually have?