Ubuntu Linux에서의 사운드 공유 설정 (ESD, OSS, ALSA)

출처 : KLDP의 lunatine님
http://bbs.kldp.org/viewtopic.php?t=61778



이전에 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
_________________
Lunatine Smile

by kiho | 2005/09/23 15:08 | 리눅스 | 트랙백 | 덧글(0)

트랙백 주소 : http://kiho.egloos.com/tb/645840
☞ 내 이글루에 이 글과 관련된 글 쓰기 (트랙백 보내기) [도움말]

:         :

:

비공개 덧글

◀ 이전 페이지          다음 페이지 ▶