본문 바로가기

♪ 아치리눅스

여러 어플에서 동시에 소리를 듣기 위한 Dmix 설정...

1. .asoundrc
pcm.dmixer {
    type dmix
    ipc_key 1024
    ipc_key_add_uid false
    ipc_perm 0666		# mixing for all users
                 		# for users only in your group use 0660

    slave {
        pcm "hw:0,0"
        period_time 0
        period_size 1024
        buffer_size 8192
   rate 44100
    }
    bindings {
        0 0
        1 1
    }
}

pcm.dsp0 {
    type plug
    slave.pcm "dmix"
}

pcm.!default {
        type plug
        slave.pcm "dmix"
}

pcm.default {
   type plug
   slave.pcm "dmix"
}

ctl.mixer0 {
    type hw
    card 0
}

2. Firefox의 dmix 설정
sudo vi /opt/mozilla/bin/firefox
export FIREFOX_DSP="aoss" 를 추가.


3. Audacious
a. 설정에서 Audio Device: "dmixer"
b. software volume control에 체크
c. Advanced Settings에서
* buffer time: 750ms
* period time: 75ms

4. Gaim
Tools - Preferences - Sounds - Sound Command를
aplay -D plug dmix %s

5. MPD
/etc/mpd.conf
mixer_device 부분
mixer_type              "alsa"
mixer_device            "dmix"
mixer_control           "PCM"
ao_driver_options       "dev=dmixer"
#or
ao_driver_options       "dev=plug:dmix"
6. MPlayer
~/.mplayer/config
ao = alsa:device=dmix