Skip site navigation (1)Skip section navigation (2)
Date:      02 Sep 2001 15:43:21 +0459
From:      fn@hungry.org (Faried Nawaz)
To:        freebsd-hackers@freebsd.org
Subject:   .so and threads, and stereo /dev/dsp, freebsd 4.3-stable.
Message-ID:  <m3zo8dc1pc.fsf@localhost.nilpotent.org>

next in thread | raw e-mail | index | archive | help

Hello,

I checked out quakeforge (http://www.quakeforge.net/) from their cvs
tree, and tried building it on FreeBSD yesterday.  It mostly worked,
but I ran into two odd problems.

Quakeforge uses plugins to handle sound; there is an OSS plugin for
the normal system sound libs, and an SDL plugin if you have libsdl
installed.  It can also build other plugins (there are ones for ALSA,
SGI, etc) depending on one's platform.

When I build sdl from ports, its configure script sees that it can use
gcc -thread, and builds libsdl with threads support.  The downside is
that I need to use libc_r when I link against other apps.  When
quakeforge builds a .so for its sdl sound plugin, it uses something
like "gcc -thread -shared ... -o libsound_sdl.so"; which all nice and
good, except it doesn't pull in libc_r.  So, when quakeforge runs with
the sdl sound plugin, it complains about not being able to find the
pthread_cond_wait symbol.  Is there something special I need to do to
make gcc link with -lc_r for gcc -shared -thread code?

Next: the OSS plugin builds but doesn't seem to work properly.  At
some point, it tries to set /dev/dsp to stereo, and fails:

        tmp = 0;
        if (shm->channels == 2)
                tmp = 1;
        rc = ioctl (audio_fd, SNDCTL_DSP_STEREO, &tmp);
        if (rc < 0) {
                perror (snd_dev);
                Con_Printf ("Could not set %s to stereo=%d", snd_dev, shm->chann
els);
                close (audio_fd);
                return 0;
        }

I have a Creative 128 card which identifies itself as

pcm0: <AudioPCI ES1373-8> port 0x6800-0x683f irq 10 at device 10.0 on pci0

What can I do here to make quakeforge use the sound card?


Faried.
-- 
"...the first are last, the blessed get wired
 the best is yet to come..."
                               self name.
superstar!

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?m3zo8dc1pc.fsf>