Re: Linux-Error (Ubuntu)

42 views
Skip to first unread message
Message has been deleted

Gwern Branwen

unread,
Jul 7, 2009, 8:28:43 AM7/7/09
to brain-t...@googlegroups.com
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

On Tue, Jul 7, 2009 at 7:39 AM, sutur wrote:
> I've tried using Brainworkshop on several different machines all
> running Ubuntu-Linux 9.04 and always get the same error after playing
> a few seconds and the application shuts down. Here is what the
> terminal says:
>
> python brainworkshop.pyw
>
> ALSA lib pcm_pulse.c:626:(pulse_prepare) PulseAudio: Unable to create
> stream: Invalid argument
>
> python: pcm_pulse.c:361: pulse_write: Assertion `pcm->stream' failed.
> Aborted
>
> has anyone got any ideas?

Yes, I've seen this before. This is thanks to the messed-up sound
system in Ubuntu*. I find that typically it's because something else
is playing or is ready to play eg. Amarok is running in your taskbar.
Closing those programs out and restarting BW helped me. Another thing
that might help is 'killall pulseaudio && pulseaudio &'.

* I say messed up, because this whole PulseAudio switch in the recent
Ubuntus has caused me nothing but grief. I don't entirely understand
what was wrong with the old ALSA/OSS setup...

- --
gwern
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)

iEYEAREKAAYFAkpTPvgACgkQvpDo5Pfl1oJ3jgCdHIIjHsQmK48oPChmA2MV2nFF
r80AnierkRLVa+RciHi/AQonXj4C8gkb
=Quaw
-----END PGP SIGNATURE-----

sutur

unread,
Jul 7, 2009, 12:43:07 PM7/7/09
to Dual N-Back, Brain Training & Intelligence
Thanks for your fast answer Gwern! Unfortunately the error remains
even after closing all other programs and killing "pulseaudio".
Also sorry for having deleted my original post but I decided to add it
to another linux-thread without knowing that there already was a
response ;)

Paul

unread,
Jul 7, 2009, 1:09:58 PM7/7/09
to brain-t...@googlegroups.com
One thing to try is to switch the audio driver pyglet uses.  The SVN version of pyglet includes a new pluseaudio driver.

Download this:

rename the existing brainworkshop/pyglet folder and replace it with the one in the zip file.

Look for these lines in brainworkshop.pyw:

    pyglet.options['audio'] = ('directsound', 'openal', 'alsa', )
    # use in pyglet 1.2: pyglet.options['audio'] = ('directsound', 'pulse', 'openal', )

Comment out the first line and use the second line instead by removing the "# use in pyglet 1.2: " .

I'm not sure if this will change anything but it's worth a try.

If all else fails I believe the Windows version of pyglet can be run in Linux using Wine.

-paul

sutur

unread,
Jul 9, 2009, 3:21:29 AM7/9/09
to Dual N-Back, Brain Training & Intelligence
Wow Paul, thanks a lot! Using the SVN version of pyglet seems to work
just fine; not a single sound error yet.

On Jul 7, 7:09 pm, Paul <plh...@gmail.com> wrote:
> One thing to try is to switch the audio driver pyglet uses.  The SVN version
> of pyglet includes a new pluseaudio driver.
>
> Download this:http://brainworkshop.sourceforge.net/misc/pyglet-trunk-2448.zip
>
> rename the existing brainworkshop/pyglet folder and replace it with the one
> in the zip file.
>
> Look for these lines in brainworkshop.pyw:
>
>     pyglet.options['audio'] = ('directsound', 'openal', 'alsa', )
>     # use in pyglet 1.2: pyglet.options['audio'] = ('directsound', 'pulse',
> 'openal', )
>
> Comment out the first line and use the second line instead by removing the
> "# use in pyglet 1.2: " .
>
> I'm not sure if this will change anything but it's worth a try.
>
> If all else fails I believe the Windows version of pyglet can be run in
> Linux using Wine.
>
> -paul
>
Reply all
Reply to author
Forward
0 new messages