[01:12:56] *** mohij has left #openal [03:25:10] *** jvalenzu has joined #openal [03:46:23] *** LtJax has quit IRC [04:10:34] *** mattn2|home_ has joined #openal [04:27:43] *** mattn2|home has quit IRC [04:33:25] *** jvalenzu has quit IRC [06:19:51] *** jvalenzu has joined #openal [06:42:28] *** jvalenzu has quit IRC [07:06:33] *** jvalenzu has joined #openal [07:48:06] *** jvalenzu has quit IRC [08:15:17] *** jvalenzu has joined #openal [08:46:37] *** jvalenzu has quit IRC [09:35:01] *** mohij has joined #openal [09:35:02] *** ChanServ sets mode: +v mohij [09:49:25] *** alexush has joined #openal [11:06:34] * KittyCat is away: sleep [11:42:09] *** mohij has left #openal [12:56:59] *** prophile has joined #openal [12:57:00] *** ChanServ sets mode: +v prophile [12:59:21] *** LtJax has joined #openal [12:59:21] *** ChanServ sets mode: +v LtJax [15:39:49] *** jvalenzu has joined #openal [16:40:58] *** jvalenzu has quit IRC [17:07:50] *** mattn2|home_ has quit IRC [18:05:34] *** jvalenzu has joined #openal [21:06:14] * KittyCat is back. [22:10:47] *** drguildo has joined #openal [22:10:56] <drguildo> hi [22:11:37] <KittyCat> hi [22:12:26] <drguildo> i am having a problem with a java library that uses openal and i think the problem might be with openal [22:12:39] <drguildo> i don't suppose you could help me try and find the source of the problem? [22:13:10] <drguildo> http://slick.javaunlimited.net/viewtopic.php?t=656 [22:13:15] <KittyCat> I don't use java, but I can try [22:13:37] <drguildo> thanks [22:13:55] <drguildo> well the first thing i'd like to do is identify whether the problem lies with openal [22:14:00] <drguildo> i downloaded the latest from svn [22:14:18] <drguildo> there is a test directory but i don't seem to be able to find out how to build the code in it [22:14:23] <KittyCat> it seems it can't find the lib [22:14:29] <drguildo> indeed [22:14:30] <KittyCat> you sure it built and installed correctly? [22:14:39] <drguildo> as sure as i can be [22:14:44] <drguildo> i have a copy in /usr/lib [22:15:02] <drguildo> and the library comes with a libopenal.so which i've pointed it to [22:15:31] <drguildo> i've since set it up in eclipse and now i'm also getting errors about /dev/dsp being busy [22:15:44] <drguildo> even though according to lsof nothing is using it [22:16:00] <KittyCat> can you run other openal apps? [22:16:30] <drguildo> good question [22:16:37] <drguildo> the only one i've been pointed to is a large game [22:16:46] <drguildo> like i say, i noticed the tests directory in svn [22:16:57] <drguildo> but the readme says they don't get built because they're out of date [22:17:55] <KittyCat> you should be able to run autogen.sh, configure, and make in the contrib directory [22:18:14] <drguildo> ok, i'll try that [22:18:43] <KittyCat> don't need to make install there. you can just go into the various sub dirs and run the produced programs [22:19:54] <drguildo> make fails [22:20:06] <KittyCat> with what? [22:20:21] <drguildo> make[3]: Entering directory `/home/simon/src/openal/contrib/demos/panning2d' [22:20:21] <drguildo> gcc -DHAVE_CONFIG_H -I. -I../.. -Wall -ansi -pedantic -g -O2 -MT panning2d.o -MD -MP -MF .deps/panning2d.Tpo -c -o panning2d.o panning2d.c [22:20:24] <drguildo> panning2d.c:7:21: error: AL/alut.h: No such file or directory [22:20:47] <drguildo> i take it alut only comes with the latest from svn [22:20:50] <KittyCat> build freealut, which should be in the subdir of the base [22:20:52] <drguildo> seeing as i don't have that header [22:21:15] <drguildo> my distro seems to have a package, i'll try that [22:21:49] <KittyCat> ok. just make sure it doesn't pull in the openal package [22:21:59] <drguildo> no luck [22:22:04] <drguildo> i'll build the svn version [22:22:07] <drguildo> of both [22:24:45] <drguildo> bear with me :) [22:25:21] <KittyCat> :) [22:26:39] <drguildo> hmm [22:26:44] <drguildo> panning2d builds fine [22:26:53] <drguildo> but when i run it, it complains it can't find libalut [22:27:14] <KittyCat> you install that yet? [22:27:20] <drguildo> yeah [22:27:36] <drguildo> i don't see how it could build if it couldn't find it [22:27:40] <KittyCat> you may need to add /usr/local/lib to your lib path [22:27:46] <drguildo> ahh ok [22:28:07] <KittyCat> in /etc/ld.so.conf [22:28:14] <drguildo> now it dumps core [22:28:16] <drguildo> ugh [22:28:45] <drguildo> so does altest [22:29:08] <KittyCat> run it in a debugger [22:30:09] <drguildo> can i paste the backtrace? [22:30:20] <KittyCat> http://rafb.net/paste [22:30:58] <drguildo> http://rafb.net/p/7iUhDP70.html [22:31:32] <KittyCat> ugh, okay.. [22:31:58] <KittyCat> edit src/backends/alc_backend_sdl.c [22:32:37] <drguildo> ok [22:32:43] <KittyCat> in alcBackendOpenSDL_, change the malloc(..) to calloc(1, ..) [22:33:27] <KittyCat> save, rebuild openal, then reinstall the lib. don't need to change alut [22:34:01] *** LtJax has quit IRC [22:34:38] <drguildo> yup, that works [22:34:50] <drguildo> panning2d works fine [22:35:06] <KittyCat> try the java lib again [22:36:14] <drguildo> now i get: ALSA lib pcm_dmix.c:866:(snd_pcm_dmix_open) unable to open slave [22:36:20] <drguildo> instead of the /dev/dsp error [22:37:00] <KittyCat> sounds like something's tying up your soundcard's voice, and openal can't open one itself [22:37:21] <KittyCat> do you use kde/arts or esd or something? [22:37:28] <drguildo> nope [22:37:30] <drguildo> just alsa [22:38:09] <KittyCat> sounds like there's an app running that's taking the only hardware voice your card has [22:38:55] <KittyCat> maybe java itself [22:39:16] <drguildo> how can alsa work if that's the case? [22:40:03] <KittyCat> you need to find out how to configure whatever it is taking the card, and make it use the default device (which will be dmix on single-voice cards) [22:41:43] <drguildo> is there any way to find out what's taking it? [22:42:21] <drguildo> aha! [22:42:38] <drguildo> simon ~$ while true; do sudo lsof /dev/dsp; done [22:42:38] <drguildo> COMMAND PID USER FD TYPE DEVICE SIZE NODE NAME [22:42:39] <drguildo> java 24212 simon 18r CHR 14,3 10385 /dev/sound/dsp [22:42:40] <drguildo> is that it? [22:42:55] <KittyCat> looks like it [22:43:00] <drguildo> what i did was [22:43:09] <drguildo> typed that bash statement [22:43:18] <drguildo> then ran the class that caused the error in eclipse [22:43:40] <drguildo> it wouldn't have picked up the class itself trying to play sound would it? [22:44:10] <KittyCat> no idea. I don't use java [22:45:14] <KittyCat> edit ~/.asoundrc (it may be a new file, that's alright) and add this: [22:45:29] <KittyCat> pcm.dsp0 { [22:45:29] <KittyCat> type plug [22:45:29] <KittyCat> slave.pcm "dmix" [22:45:29] <KittyCat> } [22:45:52] <drguildo> k [22:46:04] <KittyCat> that should make anything that uses oss use dmix instead of taking the hardware voice [22:46:53] <drguildo> do i need to restart anything? [22:47:11] <KittyCat> the app using oss, but not your system or anything [22:48:21] *** prophile has quit IRC [22:48:25] <drguildo> well i still get the same error [22:48:33] <drguildo> the weird thing is, it's intermitant [22:48:42] <drguildo> but about 80-90% of the time i will get it [22:49:07] <KittyCat> sounds like something's stopping and starting that's using it. hmm.. [22:50:20] <KittyCat> for alsa apps, make sure you set them to use 'default' or 'dmix'. most should use 'default' by default, but some attempt to use hw:0,0 which will take the hardware voice [22:50:38] <KittyCat> not related to this problem, but just to note [22:52:16] <drguildo> when i run that while loop, i get the error a lot less [22:52:39] <drguildo> it is complaining about not being able to find a java library now, let me add it to the build... [22:53:21] <KittyCat> there aren't any other sounds playing when that happens? you may need to restart any running java apps [22:54:58] <drguildo> i am certain nothing that is accessing the sound device is running [22:55:43] <KittyCat> sometimes an app will load up and won't see changes to the .asoundrc file until it's restarted, even if it's not holding a device open [22:56:09] <drguildo> when i run that while loop the only program i see accessing /dev/dsp is java [22:57:20] <KittyCat> yeah, so there's probably a java app open that's intermittently opening /dev/dsp, and not paying attention to the changes you made to .asoundrc (as long as you put it in correctly, anyway) [22:58:20] <drguildo> the only java program running is eclipse [22:58:54] <drguildo> i restarted that after changing asoundrc [23:00:30] <KittyCat> hmm.. [23:00:38] <KittyCat> can you close that and run the app? [23:00:53] <drguildo> i'll try running it from the command line [23:02:43] <drguildo> same problem, so i guess it's not eclipse [23:03:16] <drguildo> same thing with the polling of /dev/dsp making it more likely to work [23:04:27] <KittyCat> try this. edit ~/.openalrc and add these two lines: [23:04:37] <KittyCat> (define devices '(alsa)) [23:04:38] <KittyCat> (define alsa-out-device "default") [23:05:46] <drguildo> no difference [23:06:01] <drguildo> i got it to run just now without the polling loop [23:06:05] <drguildo> but the sound was stuttery [23:06:52] <KittyCat> that'll happen, unfortunately [23:07:22] <drguildo> now lsof isn't even showing java trying to access it [23:07:47] <drguildo> that'll be because i edited .openalrc [23:08:16] <drguildo> if i delete it, it shows java accessing it [23:08:37] <KittyCat> hmm, weird. it's trying to use oss by default [23:08:42] <drguildo> yeah [23:08:53] <drguildo> also weird how when i force it to use alsa, it still doesn't work [23:09:00] <drguildo> even though it's not accessing it directly anymore [23:09:33] <drguildo> exact same error as far as i can tell [23:10:44] <KittyCat> there's a note in the alsa backend that says alsa can't open the dmix device if it was just closed less than 2 seconds earlier. maybe the initial probing of backends is causing problems [23:10:56] <KittyCat> I don't know why that'd exclusively affect java, though [23:17:15] *** jvalenzu has quit IRC [23:17:25] <drguildo> hmm [23:17:28] <drguildo> this is frustrating [23:19:27] <drguildo> http://wtanaka.com/node/7609 [23:21:05] <KittyCat> does that work? [23:21:52] <drguildo> i just tried running java under aoss and it doesn't seem to help [23:23:11] <KittyCat> hmm, weird. it shouldn't be the delay causing the problem because the alsa backend already delays on error [23:25:26] <drguildo> do you think it's just this java library? [23:25:45] <KittyCat> I dunno, you said the other apps work [23:26:18] <KittyCat> edit ~/.openal.rc and change the "default" to "dmix" [23:27:07] <drguildo> ~/.openalrc? [23:27:28] <KittyCat> yeah, where you added those two lines for alsa? [23:29:09] <drguildo> yeah, but there's not meant to be a dot in the filename is there? [23:29:22] <drguildo> before rc [23:29:44] <KittyCat> yes there is. just like for ~/.asoundrc [23:29:56] <KittyCat> not right before the rc, no [23:30:01] <KittyCat> right before the whole name [23:30:13] *** jvalenzu has joined #openal [23:32:32] <drguildo> ok [23:32:39] <drguildo> well it doesn't make any difference anyway :-( [23:51:14] <drguildo> i fixed it :) [23:53:30] <KittyCat> what was the problem? [23:53:54] <drguildo> the library i was using makes use of another library [23:54:00] <drguildo> which it maintains a copy of [23:54:02] <drguildo> which was out of date [23:54:09] <drguildo> i copied across the latest one and now it works [23:54:10] <drguildo> :-/ [23:54:49] <KittyCat> ah