2013-04-07 2 views
3

TravisCI을 사용하여 오디오 기능이있는 SDL 응용 프로그램을 테스트하려고합니다 (테스트에는 필요하지 않습니다).TravisCI 오디오 장치가 없습니다.

가 나는 트래비스의 VM에서 응용 프로그램을 시작했을 때 그것으로 종료 :

ALSA lib confmisc.c:768:(parse_card) cannot find card '0' 
ALSA lib conf.c:4241:(_snd_config_evaluate) function snd_func_card_driver returned error: No such file or directory 
ALSA lib confmisc.c:392:(snd_func_concat) error evaluating strings 
ALSA lib conf.c:4241:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory 
ALSA lib confmisc.c:1251:(snd_func_refer) error evaluating name 
ALSA lib conf.c:4241:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory 
ALSA lib conf.c:4720:(snd_config_expand) Evaluate error: No such file or directory 
ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM default 
Could not open sound: No available audio device 

비디오 장치를 에뮬레이션 할 수 xvfb와 같은 오디오 장치를 에뮬레이션 할 수 있나요?

+0

동일한 문제가 발생하여 방금 오류가 발생하여 catch 섹션에서 아무 것도하지 않았습니다. 테스트를 위해 오디오가 필요 없으므로 이제는 모두 패스합니다. – sunyata

답변

2

커널 모듈을로드 할 수있는 경우 드라이버 snd-dummy을 사용해보십시오.

그렇지 않으면 SDL에 장치 이름 null (환경 변수 AUDIODEV 설정)을 사용하도록 지정하십시오. (null 장치가 정확한 타이밍을 얻지 못합니다.)

+0

앱을 실행하기 전에'export AUDIODEV = null'을 사용하여 수정했습니다! 나는'snd-dummy'를 사용해 보지 않았지만 조금 복잡해 보입니다. –

+0

Travis-CI의 가상화가 modprobe를 허용하지 않는 것 같습니다 : '$ sudo modprobe snd-dummy 치명적 : /lib/modules/2.6.32-042stab079.5/modules.dep를로드 할 수 없습니다 : 해당 파일이나 디렉토리가 없습니다. "sudo modprobe snd-dummy"명령은 before_install 동안 1로 실패하고 종료되었습니다 .' – drewish

관련 문제