With cordite in the air, splintered steel, shell casings and powder burns, there’s only one explanation...
Pre SG 1.0 archive

/dev/dsp suggestion for wQ3 engine

Postby hika » Tue Mar 27, 2007 11:47 pm

Ah ! I just solved one problem I had with sound resources under FreeBSD.
I was not able to have both Teamspeak sound and Q3 sound, until I found the cause :
Both Teamspeak and Q3 open dsp device in read/write mode.

I manage to patch my IoQ3 sources from
Code: Select all
audio_fd = open(snddevice->string, O_RDWR);
to
Code: Select all
audio_fd = open(snddevice->string, O_WRONLY);

in ./code/unix/linux_snd.c

Btw, I did not understand why the device was opened in read mode ... is there some kind of audio recording functionality ?

And for those who use FreeBSD (and OSS sound system), don't forget to create muliple virtual channels 8)

@sig11: so, is it possible to use this small patch for the wQ3 engine ?
You can add #ifdef __FreeBSD__ if you worry about portability ;)
SG name: Manchot
SG fansite: http://western.bsdmon.com
Image
userbar originally created by Caffeine
User avatar
hika
SG Team
 
Posts: 703
Joined: Thu May 25, 2006 2:32 pm
Location: Trévoux, France



Re: /dev/dsp suggestion for wQ3 engine

Postby sig11 » Wed Mar 28, 2007 10:23 am

hika wrote:
Btw, I did not understand why the device was opened in read mode ... is there some kind of audio recording functionality ?


No, I don't think so. Actually, opening the audio device for reading would mean to record from the mic. I don't think anybody wants the screaming, yelling and cursing of the player inside demos and such ;-) ...

@sig11: so, is it possible to use this small patch for the wQ3 engine ?
You can add #ifdef __FreeBSD__ if you worry about portability ;)

Sure ! I'll test it tonight - but I don't see why it couldn't go into the engine - even for general Unix.
In-game name: =SG= Django (yes, it's cliché :-) )
User avatar
sig11
SG Team
 
Posts: 616
Joined: Sun Mar 30, 2003 1:00 pm
Location: Germany




Return to Stand-alone Testing

Show Sidebar
Show Sidebar

User Control Panel

cron