[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [pygame] Strange Error with Mixer on FreeBSD



andrew baker <failrate@xxxxxxxxx>:

> Hello,
> I have a laptop with a PCI sound card running the current stable build of
> FreeBSD (6.0) that seems to support normal audio (e.g., it plays CDs now
> that I load the proper kernel sound file plugin... uh... thing at boot).

kernel module ;-)

> When I tried:
>
> import pygame
> from pygame.locals import *
>
> pygame.init()
>
> It seemed to work fine, but spat out the line:
>
> Audio write:  Invalid argument

Probably /dev/mixer* do not have the correct permissions. Can you use the
'mixer' application without any problems and are the /dev/mixer entries
read/writeable by anyone (ogu+rw)? The entry of `ls -l /dev/mixer` should look
like that:

~ # ls -l /dev/mixer
crw-rw-rw-  1 root  wheel   30,   0 Jan  4 14:04 /dev/mixer

> Then, when I instantiated a Sound object and tried to .play() it, instead of
> hearing audio, I got something like <Channel object at xad9as8fd098f>
>
> I tried Googling for assistance, but couldn't find anything pertinent.
>
> Any thoughts?

Works fine for me on FreeBSD RELENG_5. I can recheck it for RELENG_6 the next
days, if the above hints do no work for you.

What sound chipset do you have by the way (loaded kernel module is enough, if
you do not know it)?

Regards
Marcus