[Vorbis] libao NAS compilation and playback issues

Matt Prazak prazak_lists
Mon Jun 21 12:23:26 PDT 2004


I saw that libao has a NAS plugin and wanted to try it out, especially
with ogg123.  However, I had/have several problems.  My platform is
Solaris 9/SPARC 12/02, NAS 1.6, libao 0.8.5, curl 7.10.8, libogg 1.1,
libvorbis 1.0.1, and vorbis-tools 1.0.1.

PROBLEM ONE:
------------

I had to specify LDFLAGS="-lXt -lsocket -lm" before running ./configure
with "--enable-nas" in order to get configure to make a correct NAS
plugin Makefile.  The config.log file showed that the test for NAS was
failing due to linking errors regarding dependencies in libaudio:

configure:12853: checking for AuOpenServer in -laudio
configure:12883: cc -o conftest -xO4 -fast -w -fsimple -native -xcg92
-g -I/users/prazak/.../nas/1.6/usr/openwin/include
-I/users/prazak/.../libao/0.8.5/include
-I/users/prazak/.../libogg/1.1/include
-I/users/prazak/.../libvorbis/1.0.1/include
-I/users/prazak/.../curl/7.10.8/include   conftest.c -laudio -lXau
-L/usr/openwin/lib -R/usr/openwin/lib -lpthread  >&5
Undefined                       first referenced
symbol                             in file
XtAppAddWorkProc /users/prazak/.../nas/1.6/usr/openwin/lib/libaudio.so
XtRemoveInput /users/prazak/.../nas/1.6/usr/openwin/lib/libaudio.so
socket /users/prazak/.../nas/1.6/usr/openwin/lib/libaudio.so
XtAppAddInput /users/prazak/.../nas/1.6/usr/openwin/lib/libaudio.so
socket /users/prazak/.../nas/1.6/usr/openwin/lib/libaudio.so
XtAppAddInput /users/prazak/.../nas/1.6/usr/openwin/lib/libaudio.so
gethostbyname /users/prazak/.../nas/1.6/usr/openwin/lib/libaudio.so
inet_addr /users/prazak/.../nas/1.6/usr/openwin/lib/libaudio.so
XtRemoveWorkProc /users/prazak/.../nas/1.6/usr/openwin/lib/libaudio.so
setsockopt /users/prazak/.../nas/1.6/usr/openwin/lib/libaudio.so
floor /users/prazak/.../nas/1.6/usr/openwin/lib/libaudio.so
connect /users/prazak/.../nas/1.6/usr/openwin/lib/libaudio.so
ld: fatal: Symbol referencing errors. No output written to conftest


PROBLEM TWO:
------------

Running ogg123 with --device=nas results in the following error
message, but using --device=sun works well:

Error: This error should never happen (146).  Panic!

In Solaris 9/SPARC, in /usr/include/sys/errno.h, errno 146 corresponds
to

#define ECONNREFUSED    146     /* Connection refused */

It looks like it would be straight-forward to add a check for this
condition in ogg123.


PROBLEM THREE:
--------------

Problem two was caused by nasd running in local mode.  Re-launching
nasd with "-aa" allowed libao to connect to it and proceed to attempt
playback.


PROBLEM FOUR:
-------------

Playback from ogg123/libao while using NAS (--device=nas) is very
choppy and slow (as if it is playing back at a very slow tempo).
However, using --device=sun works very well.  I tried to look at the
NAS plugin source file, ao_nas.c, but I honestly have not been able to
figure out the NAS API well enough.  It seems there is a problem with
the buffering, perhaps, between libao and nasd.

One work-around that I found works well is to use the playRaw example
program provided with NAS via a UNIX pipe.  For example,

ogg123 --device=raw --file=- filename.ogg |
.../nas-1.6/clients/audio/examples/playRaw -

I had to edit playRaw.c to make sure its sample rate matched that
coming from ogg123.  The downside to this work-around is that CPU
utilization of playRaw is very high (probably due to pushing the data
across the pipe).


Matt

P.S.: I hope this post isn't redundant, but the xiph.org mailing list
search tool was broken.  It kept just giving me a perl source file.




__________________________________
Do you Yahoo!?
Yahoo! Mail - 50x more storage than other providers!
http://promotions.yahoo.com/new_mail


More information about the Vorbis mailing list