Thread: [Plib-users] no sound with torcs
Brought to you by:
sjbaker
From: Andrew G. <a...@ga...> - 2005-03-11 15:36:10
|
Hi! I have tried to play with torcs - all is fine except for there isn't any sound. If I understand well, torcs's sound support is provided by the plib library. All other sound applications work fine (OSS/ALSA). What are possible steps to dig in the problem? P.S. I have synced ~x86 gentoo installed. Thanks! Andrew |
From: Steve B. <sjb...@ai...> - 2005-03-11 15:59:57
|
Andrew Gaydenko wrote: > Hi! > > I have tried to play with torcs - all is fine except for there isn't > any sound. If I understand well, torcs's sound support is provided > by the plib library. All other sound applications work fine (OSS/ALSA). At one stage, Torcs was going to transition to OpenAL - did they ever do that? Well, if it is a PLIB issue, the first step is to eliminate TORCs from the equation. Download the PLIB examples tarball - build and run the sound library examples on your machine. What happens? One common problem is that the windowing system grabs the sound drivers and doesn't release them for other applications. In KDE (for example) there is a configuration option to specify how long KDE will hold onto the sound port after it last used it. If that's set to a large number (and I think it defaults to something like 60 seconds) then you won't get sound from an application if it's launched within 60 seconds of KDE making a sound. So if you have silly noises being emitted whenever you open a window (for example) - then you're stuck without sound. I generally reset that number to something like 2 seconds - then everything works OK. If that's what's going on, you should get a message from the sound library saying that it can't get access to the sound driver. I forget the exact message - but you'll know it if you see it. ---------------------------- Steve Baker ------------------------- HomeEmail: <sjb...@ai...> WorkEmail: <sj...@li...> HomePage : http://www.sjbaker.org Projects : http://plib.sf.net http://tuxaqfh.sf.net http://tuxkart.sf.net http://prettypoly.sf.net -----BEGIN GEEK CODE BLOCK----- GCS d-- s:+ a+ C++++$ UL+++$ P--- L++++$ E--- W+++ N o+ K? w--- !O M- V-- PS++ PE- Y-- PGP-- t+ 5 X R+++ tv b++ DI++ D G+ e++ h--(-) r+++ y++++ -----END GEEK CODE BLOCK----- |
From: Andrew G. <a...@ga...> - 2005-03-11 16:30:52
|
Steve, KDE sound (artsd server) is off by definition :-) OK, I have tried 1.8.4 examples. Both 'example' and 'playsound' don't play sound. To be strictly: they try to play something (not like a sound is played by other apps) during small part of second (say, 1/4) and stop playing without exiting and without CPU eating (I must do Ctrl-C to close them). What is my next step? Andrew ======= On Friday 11 March 2005 20:55, Steve Baker wrote: ======= Andrew Gaydenko wrote: > Hi! > > I have tried to play with torcs - all is fine except for there isn't > any sound. If I understand well, torcs's sound support is provided > by the plib library. All other sound applications work fine (OSS/ALSA). At one stage, Torcs was going to transition to OpenAL - did they ever do that? Well, if it is a PLIB issue, the first step is to eliminate TORCs from the equation. Download the PLIB examples tarball - build and run the sound library examples on your machine. What happens? One common problem is that the windowing system grabs the sound drivers and doesn't release them for other applications. In KDE (for example) there is a configuration option to specify how long KDE will hold onto the sound port after it last used it. If that's set to a large number (and I think it defaults to something like 60 seconds) then you won't get sound from an application if it's launched within 60 seconds of KDE making a sound. So if you have silly noises being emitted whenever you open a window (for example) - then you're stuck without sound. I generally reset that number to something like 2 seconds - then everything works OK. If that's what's going on, you should get a message from the sound library saying that it can't get access to the sound driver. I forget the exact message - but you'll know it if you see it. |
From: Andrew G. <a...@ga...> - 2005-03-11 16:38:01
|
A small addition. I'm ready to try any patch. Or - this is for dev-list? ======= On Friday 11 March 2005 19:31, Andrew Gaydenko wrote: ======= ... OK, I have tried 1.8.4 examples. Both 'example' and 'playsound' don't play sound. To be strictly: they try to play something (not like a sound is played by other apps) during small part of second (say, 1/4) and stop playing without exiting and without CPU eating (I must do Ctrl-C to close them). What is my next step? ======= On Friday 11 March 2005 20:55, Steve Baker wrote: ======= Andrew Gaydenko wrote: > Hi! > > I have tried to play with torcs - all is fine except for there isn't > any sound. If I understand well, torcs's sound support is provided > by the plib library. All other sound applications work fine (OSS/ALSA). ... Download the PLIB examples tarball - build and run the sound library examples on your machine. What happens? ... |
From: Andrew G. <a...@ga...> - 2005-03-11 16:45:36
|
And another small addition: mod_demo works! Andrew ======= On Friday 11 March 2005 19:38, Andrew Gaydenko wrote: ======= A small addition. I'm ready to try any patch. Or - this is for dev-list? ======= On Friday 11 March 2005 19:31, Andrew Gaydenko wrote: ======= ... OK, I have tried 1.8.4 examples. Both 'example' and 'playsound' don't play sound. To be strictly: they try to play something (not like a sound is played by other apps) during small part of second (say, 1/4) and stop playing without exiting and without CPU eating (I must do Ctrl-C to close them). What is my next step? |
From: Steve B. <sjb...@ai...> - 2005-03-11 18:28:28
|
Andrew Gaydenko wrote: > And another small addition: mod_demo works! Then I think you have a problem with memory buffer sizes in your drivers or something. ---------------------------- Steve Baker ------------------------- HomeEmail: <sjb...@ai...> WorkEmail: <sj...@li...> HomePage : http://www.sjbaker.org Projects : http://plib.sf.net http://tuxaqfh.sf.net http://tuxkart.sf.net http://prettypoly.sf.net -----BEGIN GEEK CODE BLOCK----- GCS d-- s:+ a+ C++++$ UL+++$ P--- L++++$ E--- W+++ N o+ K? w--- !O M- V-- PS++ PE- Y-- PGP-- t+ 5 X R+++ tv b++ DI++ D G+ e++ h--(-) r+++ y++++ -----END GEEK CODE BLOCK----- |
From: Steve B. <sjb...@ai...> - 2005-03-11 18:19:16
|
Andrew Gaydenko wrote: > Steve, > > KDE sound (artsd server) is off by definition :-) > > OK, I have tried 1.8.4 examples. Both 'example' and 'playsound' don't play sound. > To be strictly: they try to play something (not like a sound is played by other > apps) during small part of second (say, 1/4) and stop playing without exiting and > without CPU eating (I must do Ctrl-C to close them). No error messages? > What is my next step? Dunno - both sample programs and Torcs work on my KDE-based system using several different sound systems and all three of the sound cards we have here in the Baker household. If you are getting *SOME* sound - then maybe you have a problem with your sound buffer size or something? ---------------------------- Steve Baker ------------------------- HomeEmail: <sjb...@ai...> WorkEmail: <sj...@li...> HomePage : http://www.sjbaker.org Projects : http://plib.sf.net http://tuxaqfh.sf.net http://tuxkart.sf.net http://prettypoly.sf.net -----BEGIN GEEK CODE BLOCK----- GCS d-- s:+ a+ C++++$ UL+++$ P--- L++++$ E--- W+++ N o+ K? w--- !O M- V-- PS++ PE- Y-- PGP-- t+ 5 X R+++ tv b++ DI++ D G+ e++ h--(-) r+++ y++++ -----END GEEK CODE BLOCK----- |
From: Andrew G. <a...@ga...> - 2005-03-11 18:27:48
|
Steve, There are not any error messages. Other apps work with OSS fine. OK, I'll try to find something about OSS ALSA emulation tuning, and will report my results. Andrew ======= On Friday 11 March 2005 23:14, Steve Baker wrote: ======= > OK, I have tried 1.8.4 examples. Both 'example' and 'playsound' don't play sound. > To be strictly: they try to play something (not like a sound is played by other > apps) during small part of second (say, 1/4) and stop playing without exiting and > without CPU eating (I must do Ctrl-C to close them). No error messages? > What is my next step? Dunno - both sample programs and Torcs work on my KDE-based system using several different sound systems and all three of the sound cards we have here in the Baker household. If you are getting *SOME* sound - then maybe you have a problem with your sound buffer size or something? |
From: Andrew G. <a...@ga...> - 2005-03-11 20:37:03
|
Steve, After googling for OSS tuning, I have found the only way to influence to OSS emulation. It's via something like this: echo "playsound 4 1024 non-block" > /proc/asound/card0/pcm0p/oss After such command 'playsound' plays without stopping and at waited speed :-) But... Playing has extremely high distortions. Other OSS players play absolutely clean. I have thought may be torcs will have (terrible, but have) sound with appropriate /proc comand. No, there isn't still any sound. I haven't found any other way to influence to OSS emulation except for /proc commands. Any thoughts? Andrew |
From: Andrew G. <a...@ga...> - 2005-03-12 14:38:34
|
Steve, OK, I have resolved the issue. The /proc command echo "torcs-bin 4 1024 non-block" > /proc/asound/card0/pcm0p/oss helps. Before, I didn't recognized the executable is 'torcs-bin' rather 'torcs'. To eliminate the needing of such workaround probably some fragments number must be defined in plib. Andrew |