Andy Li
Andy Li

Reputation: 6023

TravisCI no audio device

I'm trying to use TravisCI to test a SDL application, which has audio functionality (but the test does not require it).

When I started the app in the Travis's VM, it exited with:

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

Is there anything that can emulate an audio device, like xvfb can emulate a video device?

Upvotes: 4

Views: 1006

Answers (1)

CL.
CL.

Reputation: 180280

If you can load kernel modules, try the driver snd-dummy.

Otherwise, tell SDL to use device name null (set the environment variable AUDIODEV). (The null device does not get the timing correct.)

Upvotes: 2

Related Questions