[Solved] Does Oolite require PulseAudio?

For discussion of ports to POSIX based systems, especially using GNUStep.

Moderators: winston, another_commander, Getafix

Locked
mcarans
---- E L I T E ----
---- E L I T E ----
Posts: 320
Joined: Sun Jun 20, 2010 6:00 pm

[Solved] Does Oolite require PulseAudio?

Post by mcarans »

1. Does Oolite require Pulseaudio?
2. If not, can it be set up to use Alsa?
User avatar
Getafix
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 979
Joined: Tue Apr 01, 2008 12:55 pm
Location: A small ice asteroid, orbiting Oresrati in Galaxy 8 (a.k.a. northwest Armorica).
Contact:

Post 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.
Last edited by Getafix on Sun Jul 25, 2010 9:43 pm, edited 1 time in total.
"Any sufficiently advanced information is indistinguishable from noise." [Newman, Lachmann, Moore]
mcarans
---- E L I T E ----
---- E L I T E ----
Posts: 320
Joined: Sun Jun 20, 2010 6:00 pm

Post 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?
mcarans
---- E L I T E ----
---- E L I T E ----
Posts: 320
Joined: Sun Jun 20, 2010 6:00 pm

Post 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
User avatar
Getafix
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 979
Joined: Tue Apr 01, 2008 12:55 pm
Location: A small ice asteroid, orbiting Oresrati in Galaxy 8 (a.k.a. northwest Armorica).
Contact:

Post by Getafix »

Having read this and by googling the messages you posted,
this sounds like ALSA configuration.

Which distro are you on?
"Any sufficiently advanced information is indistinguishable from noise." [Newman, Lachmann, Moore]
mcarans
---- E L I T E ----
---- E L I T E ----
Posts: 320
Joined: Sun Jun 20, 2010 6:00 pm

Post 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.
User avatar
Getafix
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 979
Joined: Tue Apr 01, 2008 12:55 pm
Location: A small ice asteroid, orbiting Oresrati in Galaxy 8 (a.k.a. northwest Armorica).
Contact:

Post 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.
"Any sufficiently advanced information is indistinguishable from noise." [Newman, Lachmann, Moore]
mcarans
---- E L I T E ----
---- E L I T E ----
Posts: 320
Joined: Sun Jun 20, 2010 6:00 pm

Post by mcarans »

Ok cool thanks. I shall try that when I get home.
mcarans
---- E L I T E ----
---- E L I T E ----
Posts: 320
Joined: Sun Jun 20, 2010 6:00 pm

Post 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.
User avatar
Getafix
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 979
Joined: Tue Apr 01, 2008 12:55 pm
Location: A small ice asteroid, orbiting Oresrati in Galaxy 8 (a.k.a. northwest Armorica).
Contact:

Post by Getafix »

I'm glad you made it. 8)
"Any sufficiently advanced information is indistinguishable from noise." [Newman, Lachmann, Moore]
mcarans
---- E L I T E ----
---- E L I T E ----
Posts: 320
Joined: Sun Jun 20, 2010 6:00 pm

Post 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
Locked