Problems with libao

OSS specific BSD discussion (FreeBSD/NetBSD/OpenBSD)

Moderators: hannu, dev, cesium, kodachi

Problems with libao

Postby dgerow » Thu Nov 10, 2005 3:49 am

I've just installed OSS on an AMD64 6.0 machine. The sound is quite nice (M-Audio Audiophile 192), but I'm having problems with an app (mpd) that uses libao:

libao - OSS cannot get buffer size for device
problems opening audio device while playing "<file>"

The same configuration was working for 5.4. I vaguely remember running into this before -- can anyone give me some pointers as to how to fix this?
dgerow
 

Postby dgerow » Thu Nov 10, 2005 10:07 pm

The problem may in fact be with libao: I can speak directly to the sound card via mplayer, and through esd to the sound card via mplayer. Using libao results in, at best, really screwy sound (I can't quite describe it, but a given track will complete playing much faster than it should).

So, hopefully the admins don't mind me asking this: does anyone here have a functional setup using FreeBSD 6.0 + OSS + audio/musicpd[0]?
dgerow
 

Re: Problems with libao

Postby Guest » Fri Nov 11, 2005 9:14 am

dgerow wrote:I've just installed OSS on an AMD64 6.0 machine. The sound is quite nice (M-Audio Audiophile 192), but I'm having problems with an app (mpd) that uses libao:

libao - OSS cannot get buffer size for device
problems opening audio device while playing "<file>"

The same configuration was working for 5.4. I vaguely remember running into this before -- can anyone give me some pointers as to how to fix this?


The README.Envy24 says:
With mpg123 (at least versions 0.59r and earlier) you need to modify the
sources and remove the call to ioctl(SNDCTL_DSP_GETBLKSIZE). Use fixed
buffer size (say 512 or 1024) instead. This hopefully gets fixed in
later versions of mpg123.


The same fix works for libao. That is you need to change the corresponding line in the source and recompile libao.

What also worked for me: Copying the include/sys/soundcard.h to /usr/include/sys/soundcard.h and recompile libao. IIRC this breaks compilation of some other applications.

I wonder why this isn't fixed on the driver side (As libao doesn't seem to cause any troubles with any other drivers).

Note that this doesn't help for the xine or vlc sound problems. I only could get them to work using artsd.
Guest
 

Postby dgerow » Sat Nov 12, 2005 3:11 am

Strange -- I'd have thought that manually specifying a buffer of 512/1024 bytes would accomplish the same thing, which is what I did.

Ah, well. I'll find some way to work around it.
dgerow
 


Return to BSD

Who is online

Users browsing this forum: No registered users and 2 guests