Changing device while stream is running

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi everyone,
    
    I've been trying to (unsuccessfully) solve this issue for about two
    days now so I feel I've done mandatory rtfm and I do need some help.

    My general problem is: I'd like to be able to switch device that
    plays audio, while the audio stream is working - without player
    application knowing anything happened.

    My current asoundrc can switch the card through environmental
    variable, and defaults to dmix (that then has hw:1,0 slave) if no
    variable is present.

    What I've done so far to narrow my problem, was trying to learn how
    'hooks' plugin works (by reading alsa.conf and few posts in mailing
    list archive), and try to figure out how ctl interface works,
    thinking I might add a custom ctl control, that might then control
    the pcm.default to -somehow- switch between two different slave plugins.
    I can vaguely recall seeing something similar happening with hooks plugin,
    but I might be wrong.

    Any information, or guidance towards more information would be
    highly appreciated - thanks in advance.

    If it helps, this is my current asoundrc:

        pcm.!default {
            @func getenv
            vars [ ALSA_DEFAULT_PCM ]
            default "dmix"
        }

        ctl.!default {
            type hw
            card 1
        }

        # Mixes everything to device hw:1,0
        pcm.!dmix {
            type dmix
            ipc_key 1024
            slave {
                pcm "hw:1,0"
                period_time 0
                period_size 1024
                buffer_size 4096
                rate 48000
            }
            bindings {
                0 0
                1 1
            }
        }



------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Alsa-user mailing list
Alsa-user@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/alsa-user



[Index of Archives]     [ALSA Devel]     [Linux Audio Users]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]

  Powered by Linux