Page 1 of 1

[Solved] Does Oolite require PulseAudio?

Posted: Sun Jun 27, 2010 6:07 pm
by mcarans
1. Does Oolite require Pulseaudio?
2. If not, can it be set up to use Alsa?

Posted: Sun Jun 27, 2010 6:21 pm
by Getafix
1. Yes, If you install the .package version.
2. If you don't want to install PulseAudio you can
hide the oolite's libespeak library as described in this post.


EDIT(26/Jul/2010): Oolite 1.74.2 does not have PulseAudio dependency.
PulseAudio is just an alternative. Read here.

Posted: Sun Jun 27, 2010 9:23 pm
by mcarans
Expression 'snd_pcm_hw_params_set_buffer_size_near( pcm, hwParams, &lowLatency )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 415

I get the above (and no sound) - any ideas?

Posted: Sun Jun 27, 2010 9:24 pm
by mcarans
Sorry here's the whole message:
Expression 'snd_pcm_hw_params_set_buffer_size_near( pcm, hwParams, &lowLatency )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 415
Expression 'parameters->channelCount <= maxChans' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 916
Expression 'ValidateParameters( outputParameters, hostApi, StreamDirection_Out )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 1134
Expression 'parameters->channelCount <= maxChans' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 916
Expression 'ValidateParameters( outputParameters, hostApi, StreamDirection_Out )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 1134

Posted: Sun Jun 27, 2010 10:39 pm
by Getafix
Having read this and by googling the messages you posted,
this sounds like ALSA configuration.

Which distro are you on?

Posted: Mon Jun 28, 2010 10:11 am
by mcarans
I am using Ubuntu 10.04LTS. Alsa is set up such that the default output encodes to Dolby Digital using the Alsa A52 plugin for output through S/PDIF.

I removed Pulseaudio after I could not get it to work with Alsa. Maybe the Simple DirectMedia Layer is having the same problem as Pulseaudio? I did manage to get some speech just no music or sound effects in Oolite.

Posted: Mon Jun 28, 2010 11:13 am
by Getafix
Removing PulseAudio is a delicate task.
Please, read this on how to elegantly disable it.

I presume you have already renamed the
[/usr or ~/.local]/lib/Oolite/oolite-deps/lib/libespeak.so.2
[/usr or ~/.local]/lib/Oolite/oolite-deps/lib/libespeak.so.1
in order for oolite not search PulseAudio.

EDIT: Corrected typo error of libespeak version.

Posted: Mon Jun 28, 2010 12:48 pm
by mcarans
Ok cool thanks. I shall try that when I get home.

Posted: Mon Jun 28, 2010 9:41 pm
by mcarans
I did that and while it is certainly a much tidier way to get rid of Pulseaudio it did not solve my problem.

After much playing around I found in .asoundrc:
pcm.Filter_RateConvert {
type plug
# type rate
slave {
pcm "Filter_Duplex"
rate 48000
}
}
works, but if you uncomment the "type rate" line and comment the "type plug" line, it doesn't work. If you bypass that filter ie. use Filter_Duplex as the pcm.default, the Oolite music tone is lower.

Posted: Tue Jun 29, 2010 5:41 am
by Getafix
I'm glad you made it. 8)

Posted: Wed Jul 14, 2010 8:36 am
by mcarans
With a lot of trial and error and some help from the Pulseaudio devs, I managed to get A52 (Dolby Digital) encoding working through Pusleaudio in Lucid. If you're interested, see:
https://bugs.launchpad.net/pulseaudio/+bug/348353