Ubuntu Linux에서의 사운드 공유 설정 (ESD, OSS, ALSA)
이전에 zsnes 소리 설정과 관련하여 esd를 대신하여 polypaudio를
사용하는 방법을 올렸었는데, 이상하게도 polypaudio로 교체하면 그놈에
로그인할 때 Startup Sound가 나오지 않아서 esd를 유지하면서
쾌적한 속도(?)를 제공하는 사운드 설정에 대해서 알아보다가 발견한 것이
있어 이렇게 간단하게 포스팅 해 봅니다.
1. 시스템 -> 기본설정 -> 소리 를 실행하신 후 사운드 서버를 on으로 합니다.
기존에 polypaudio로 바꾸신 분은 sudo apt-get install esound esound-clients esound-common을 통해서 esd로 교체합니다
2. "sudo apt-get install libesd-alsa0"로 libesd-alsa0를 설치합니다
처음 설치하는 것이라면 libesd0를 제거하게 될 것입니다.
3. /etc/esound/esd.conf 파일을 다음과 같이 수정합니다
[esd] auto_spawn=1 spawn_options=-terminate -nobeeps -as 2 -d default spawn_wait_ms=100 # default options are used in spawned and non-spawned mode default_options=
4. /etc/asound.conf 파일을 다음과 같이 수정합니다. (없으면 생성)
# Set default sound card
# Useful so that all settings can be changed to a different card here.
pcm.snd_card {
type hw
card 0
}
# Allow mixing of multiple output streams to this device
pcm.dmixer {
type dmix
ipc_key 1024
slave.pcm "snd_card"
slave {
# This stuff provides some fixes for latency issues.
# buffer_size should be set for your audio chipset.
period_time 0
period_size 1024
buffer_size 4096
# rate 44100
}
bindings {
0 0
1 1
}
}
# Allow reading from the default device.
# Also known as record or capture.
pcm.dsnooper {
type dsnoop
ipc_key 2048
slave.pcm "snd_card"
bindings {
0 0
1 1
}
}
# This is what we want as our default device
# a fully duplex (read/write) audio device.
pcm.duplex {
type asym
playback.pcm "dmixer"
capture.pcm "dsnooper"
}
###################
# CONVERSION PLUG #
###################
# Setting the default pcm device allows the conversion
# rate to be selected on the fly.
# duplex mode allows any alsa enabled app to read/write
# to the dmix plug (Fixes a problem with wine).
pcm.!default {
type asym
playback.pcm "dmixer"
capture.pcm "dsnooper"
}
########
# AOSS #
########
# OSS dsp0 device (OSS needs only output support, duplex will break some stuff)
pcm.dsp0 {
type plug
slave.pcm "dmixer"
}
# OSS control for dsp0 (needed?...this might not be useful)
ctl.dsp0 {
type plug
slave.pcm "snd_card"
}
# OSS control for dsp0 (default old OSS is mixer0)
ctl.mixer0 {
type plug
slave.pcm "snd_card"
}
5. /etc/liba0.conf 파일을 아래와 같이 수정합니다
default_driver=alsa
6. gstreamer-properties를 실행하여 입력/출력을 모두 ALSA로 설정합니다
위와 같은 설정을 마친 후 gnome에서 로그아웃 후 다시 로그인 하시면 됩니다.
그리고, 모든 어플리케이션에서 사운드를 ALSA로 설정하시면 사운드 공유가 되는 것을 체험하실 수 있습니다.
(원 문서에서는 reboot을 권장하고 있습니다)
제가 일전에 polypaudio를 선택한 이유는 esound가 게임에서 사용하면 응답이 느린편이어서 선택하였으나,
위와 같은 방법으로 ALSA에서 처리하도록 설정해주면 alsa설정을 튜닝하시면 만족할만한 퀄리티를 얻을 수 있습니다.
(SDL을 사용하는 게임 및 프로그램에서는 libsdl1.2debian-alsa를 설치해주시기 바랍니다)
테스트 해본 프로그램은 XMMS, Xine, Zsnes, Xmame (OpenGL/SDL), Quake3, RTCW:Enermy Territory 입니다.
아주 훌륭하군요~ ^^
* Note
위와 같은 설정으로 amaroK를 사용할 때에 fade out이 설정되어있으면 음악이 다음음악으로 넘어갈 때 fade out이
제대로 되지 않고 끊기는 현상이 있습니다. ALSA쪽 버퍼 설정으로 맞추면 될거 같긴한데.. 이건 좀 더 해봐야 알겠습니다.
[원문]
Ubuntu Forums HowTo
http://www.ubuntuforums.org/showthread.php?t=32063
http://www.ubuntuforums.org/showthread.php?t=44753


5. /etc/liba0.conf 가 아니고
/etc/liba0.conf 아니고
/etc/libao.conf 입니다
miss clicked
deleted
================
Lunatine
================
Re: 5. /etc/liba0.conf 가 아니고
수정하였습니다. ^^
================
Lunatine
================
잘 됩니다.
esd나 arts를 사용해야만 동시에 사운드가 나오는줄로 알았는데, 이런 방법도 있었군요. 잘 됩니다. ^^ :)
지금 totem-xine, beep-media-player, Rhythmbox 를 동시에 실행시켜서 소리를 출력해 봤는데, 잘 되네요.
근데, 아쉽게도 pingus 는 따로 노나봅니다. 다른 것과 동시에 사운드가 나오게 되면 다운됩니다.
그래도 예전에 출력을 esd로 사용했을 땐 아예 안나와 사운드 서버를 끄고 사용했었는데, 지금은 사운드서버를 건들지 않아도 잘 되어서 좋네요...
좋은 팁 감사합니다. :)
오호.....
좋은팁 감사감사!!
:o
------------------------------------------------------
조금씩 한발자국씩... 서두르지 않고 천천히... 그렇게...
- By Fallen - :)
http://churack.tistory.com
참고로, alsa 다음 버전에는 사운드가 동시에 나오는게 기본으로 된다고
참고로, alsa 다음 버전에는 사운드가 동시에 나오는게 기본으로 된다고 알고 있습니다.
https://wiki.ubuntu.com/KoreanTeam
[quote="uriel"]참고로, alsa 다음 버전에는 사운드가 동시
2.6.14 커널을 쓰고 있는데, dmix 가 기본으로 설정되어 있군요. :-)
아마 2.6.13 커널에서부터 dmix 가 기본으로 설정된 alsa 가 포함된 것으로 알고 있습니다.
----
블로그 / 위키 / 리눅스 스크린샷 갤러리
[quote="랜덤여신"][quote="uriel"]참고로, alsa 다
dapper에서 아마록으로는 라디오 듣고 mplayer로는 mbc에서 방실이 노래 (노래 나올 때 말고 임백천 사회볼 때는 라디오에서 나오는 노래 잘 들립니다.) 듣고 있습니다. 아무 설정을 제가 한 것 없습니다.
----
I paint objects as I think them, not as I see them.
atie's minipage
댓글 달기