You are not logged in.

#1 2006-07-11 14:05:57

Youdaman
Member
From: Sydney, Australia
Registered: 2006-01-14
Posts: 41

no sound with oss2jack in quake3 or et

Hi,

I've recently installed oss2jack and it seems to work for most applications, i.e. I can now play multiple media at once and now the sound works for movies AND game when playing Neverwinter Nights.

However, sound no longer works for Quake3 or ET. I get the following error in Quake3's startup:
------- sound initialization -------
Could not mmap dma buffer PROT_WRITE|PROT_READ
trying mmap PROT_WRITE (with associated better compatibility / less performance code)
/dev/dsp: Function not implemented
Could not mmap /dev/dsp
------------------------------------

I've configured everything according to the instructions here
http://wiki.archlinux.org/index.php/All … h_oss2jack

Now the "mmap" bit is of interest, because according to the oss2jack homepage: "support for mmap. Quake3 and other games will now work correctly with oss2jack." ... however that doesn't seem to be the case, at least with me. oss2jack is working for Neverwinter Nights and other apps as I mentioned, but not for straight-up oss apps like Quake3 or ET -- anyone have a clue?

Offline

#2 2006-07-11 17:19:40

test1000
Member
Registered: 2005-04-03
Posts: 834

Re: no sound with oss2jack in quake3 or et

not me. and i'm the maintainer of the oss2jack package. It used to work, but doesn't anymore with some update i guess.

Iv'e emailed the oss2jack guy, but he doesn't answer me. It's possible that I compile the package wrong. Check the pkgbuild. maybe my hack is what is creating the problem. i really don't know...

OT: joss works with ET atleast(without capture ofc) but again it doesn't work perfectly with other apps... linux audio seems to be a neverending struggle...


KISS = "It can scarcely be denied that the supreme goal of all theory is to make the irreducible basic elements as simple and as few as possible without having to surrender the adequate representation of a single datum of experience." - Albert Einstein

Offline

#3 2006-07-12 08:38:38

Youdaman
Member
From: Sydney, Australia
Registered: 2006-01-14
Posts: 41

Re: no sound with oss2jack in quake3 or et

ET gives:
------- sound initialization -------
/dev/dsp: Function not implemented
Could not mmap /dev/dsp
------------------------------------

which is basically the same thing as with Quake3... so I tried joss and it works... BUT... to make it work I had to stop both oss2jack and jack-audio-connection-kit services, and then run them from the command line like so:
jackd -R -d alsa -S -d hw:0 -p 64 -r 44100 & oss2jack & joss quake3

The reason for this is that joss couldn't "see" jackd that was created by the jack-audio-connection-kit service:
------- sound initialization -------
joss: cannot connect to jackd
Could not mmap dma buffer PROT_WRITE|PROT_READ
trying mmap PROT_WRITE (with associated better compatibility / less performance code)
joss: cannot connect to jackd
/dev/dsp: Connection refused
Could not mmap /dev/dsp
------------------------------------

I might just stick to running jack as a normal user. Thanks again for suggesting joss -- I'd come across it already but thought it didn't work until I worked out the problem above. One thing about joss though, even if I modify the Makefile that comes with it to install to /usr install of /usr/local, the executable still looks for the joss.so in /usr/local/lib so it needs a symlink there, i.e.:
ln -s /usr/lib/joss.so /usr/local/lib/joss.so

I might contact the author of joss to change this, as Arch users typically don't install anything in the /usr/local hierarchy -- in fact /usr/local/lib/joss.so is the only file I have there now smile

Offline

#4 2006-07-12 13:16:29

test1000
Member
Registered: 2005-04-03
Posts: 834

Re: no sound with oss2jack in quake3 or et

wait a minute... kfusd is what helps oss2jack create /dev/dsp . which is also a client for jackd. Correct? So why do you need to run oss2jack as well as joss? Does that even work?

joss creates it's own /dev/dsp node...


KISS = "It can scarcely be denied that the supreme goal of all theory is to make the irreducible basic elements as simple and as few as possible without having to surrender the adequate representation of a single datum of experience." - Albert Einstein

Offline

#5 2006-07-12 15:06:10

Youdaman
Member
From: Sydney, Australia
Registered: 2006-01-14
Posts: 41

Re: no sound with oss2jack in quake3 or et

Well I seem to have things working now, and here's how -- in /etc/rc.conf I put kfusd in my modules list however I don't blacklist snd_pcm_oss or snd_seq_oss. I also don't load the jack-audio-connection-kit or oss2jack modules. This way I can still play games like Quake3 and ET as I used to, as well as listen to music with XMMS and control the volume properly. To run Neverwinter Nights however, I run the following script (I have a .nwn directory in my home directory for Neverwinter Nights):

#!/bin/sh
sudo rmmod snd-pcm-oss
sudo /etc/rc.d/jack-audio-connection-kit start
#jackd -R -d alsa -S -d hw:0 -p 64 -r 44100 & oss2jack &
sudo /etc/rc.d/oss2jack start
cd ~/.nwn
./nwn
sudo /etc/rc.d/oss2jack stop
sudo /etc/rc.d/jack-audio-connection-kit stop
sudo rmmod snd-pcm-oss && sudo modprobe snd-pcm-oss

What the above does is unload the snd-pcm-oss module (but I don't bother about unloading the snd-seq-oss module as it doesn't seem necessary) and then starts up jackd and oss2jack before starting up Neverwinter Nights. After nwn exits I stop both oss2jack and jackd and then reload the snd-pcm-oss module. I've found that I need to use rmmod prior to modprobe to actually get a /dev/dsp device (in addition to a /dev/dsp1 device) for OSS again. Using just modprobe leaves me with only a /dev/dsp1 device and thus Quake3 complains it can't find /dev/dsp.

As for running oss2jack and joss together -- if I run just jackd and then try joss quake3 then Quake3's startup says the sound system is muted. It finds it, but it's muted, so no sound. But, if I run oss2jack and then run joss quake3 I get sound. Running just quake3 without joss  doesn't work with either jackd or jackd+oss2jack. Also, as mentioned in my previous post I have to run jackd from the command line instead of using the jack-audio-connection-kit script, otherwise joss complains it can't connect to jackd.

I decided to run Quake3 and ET without joss anyway because I don't use voice chat or anything like that (yet) and it's just more straightforward. However for Neverwinter Nights jackd+oss2jack solves the problem of not being able to hear sound in the cut-scene movies (because the game itself is using sound and thus blocking access to the external movie player application). I haven't heard back from the author of joss regarding the /usr/local issue mentioned previously, so here's hoping. Also, it'd be nice if the jackd run by the jack-audio-connection-kit script in /etc/rc.d was "visible" to joss.

Offline

#6 2006-07-15 04:52:18

Youdaman
Member
From: Sydney, Australia
Registered: 2006-01-14
Posts: 41

Re: no sound with oss2jack in quake3 or et

test1000 wrote:

wait a minute... kfusd is what helps oss2jack create /dev/dsp . which is also a client for jackd. Correct? So why do you need to run oss2jack as well as joss? Does that even work?

joss creates it's own /dev/dsp node...

I've been emailing back and forth with the author of joss over the last couple of days and I worked out why I wasn't getting sound with jackd+joss -- it turns out the -R (realtime) flag to jackd caused the problem. i.e. running "jackd -R ..." and then "joss quake3" gives you the following in quake3's console output:

------- sound initialization -------
------------------------------------
----- Sound Info -----
sound system is muted
   1 stereo
4096 samples
  16 samplebits
   1 submission_chunk
22050 speed
0xb7f4f49c dma buffer
No background file.
----------------------
Sound memory manager started
Loading vm file vm/ui.qvm.
zombified - calling shutdown handler
joss: jack shut us down

This zombified bit is explained here:
http://www.nabble.com/Jack-audio-error- … 71756.html

So, I found that if I wanted to hear sound using jackd+joss I had to run jackd WITHOUT the -R (realtime) flag. It's a simpler solution than unloading/loading modules and using oss2jack. I still have to work out whether I can use joss with NWN (and its movies), but at least I can now use jackd+joss for quake3 and et smile

Offline

Board footer

Powered by FluxBB