stopping the sound server in PySol code -- how?

L

Lynn

I have a SuSe 9.1 linux box (although this isn't a new issue) with
reasonably up to date everything. When I run PySol, it grabs the sound
system in a rude and complete way.

I don't listen to sound and I NEED my sound system available even if PySol
is running.

Does anyone have a simple way of ripping the sound functionality our of
PySol? I've not enough of a python programmer to deal with this.
Everything I've tried has just generated a ton of errors.
 
R

Robert Kern

Lynn said:
I have a SuSe 9.1 linux box (although this isn't a new issue) with
reasonably up to date everything. When I run PySol, it grabs the sound
system in a rude and complete way.

I don't listen to sound and I NEED my sound system available even if PySol
is running.

Does anyone have a simple way of ripping the sound functionality our of
PySol? I've not enough of a python programmer to deal with this.
Everything I've tried has just generated a ton of errors.

How did you install PySol? RPMs? Is there a PySol-sound package that you
can choose not to install? If PySol doesn't find its sound support
module, it won't bother with sound.

--
Robert Kern
(e-mail address removed)

"In the fields of hell where the grass grows high
Are the graves of dreams allowed to die."
-- Richard Harter
 
L

Lynn

Robert said:
How did you install PySol? RPMs? Is there a PySol-sound package that you
can choose not to install? If PySol doesn't find its sound support
module, it won't bother with sound.

It is via an RPM. I think it's the one that came with SuSE 9.1. It
installed pysolsoundserver.so. I renamed that file to see if not finding
it would be enough. But the script failed because it couldn't find it.

I will try uninstalling the rpm and getting the PySol source.
 
L

Lynn

Lynn said:
Robert Kern wrote:
It is via an RPM. I think it's the one that came with SuSE 9.1. It
installed pysolsoundserver.so. I renamed that file to see if not finding
it would be enough. But the script failed because it couldn't find it.

I will try uninstalling the rpm and getting the PySol source.

Nope. If I run from the src (grabbed frm www.pysol.org) I get this stack
trace:
File "pysol.py", line 47, in ?
from main import main
File "/data/apps/pysol-4.82/src/main.py", line 48, in ?
from app import Application
File "/data/apps/pysol-4.82/src/app.py", line 54, in ?
from images import Images, SubsampledImages
File "/data/apps/pysol-4.82/src/images.py", line 47, in ?
from pysoltk import tkversion, loadImage, copyImage, createImage
File "/data/apps/pysol-4.82/src/pysoltk.py", line 81, in ?
exec "from " + m + " import *"
File "<string>", line 1, in ?
File "/data/apps/pysol-4.82/src/tk/soundoptionsdialog.py", line 44, in ?
from pysolaudio import pysolsoundserver
File "/data/apps/pysol-4.82/src/pysolaudio.py", line 44, in ?
import pysolsoundserver
ImportError: No module named pysolsoundserver

If I strip out every instance of importing that module, it eventually dies
with a tk box alerting me thatg the global pysolsoundserver is not defined.

I'm farther along than I've ever been though. :)
 
D

Diez B. Roggisch

Lynn said:
I have a SuSe 9.1 linux box (although this isn't a new issue) with
reasonably up to date everything. When I run PySol, it grabs the sound
system in a rude and complete way.

I don't listen to sound and I NEED my sound system available even if PySol
is running.

Does anyone have a simple way of ripping the sound functionality our of
PySol? I've not enough of a python programmer to deal with this.
Everything I've tried has just generated a ton of errors.

What sound server do you use? I run kde and thus artsd. There is a wrapper
called artsdsp. When putting that in front of your program, it will ensure
that access to /dev/dsp and the like are rerouted through the soundserver.

for example

artsdsp enigma

lets me play enigma along with xmms. Of course you have to use xmms arts
plugin for output, as otherwise xmms shows the same annoying behaviour.
 
P

Peter Hansen

Lynn said:
Lynn wrote:
File "/data/apps/pysol-4.82/src/pysolaudio.py", line 44, in ?
import pysolsoundserver
ImportError: No module named pysolsoundserver

If I strip out every instance of importing that module, it eventually dies
with a tk box alerting me thatg the global pysolsoundserver is not defined.

This is Python: just make your own pysolsoundserver module
with dummy do-nothing functions. It's possible that the
use of pysolsoundserver is too complex for this to be easy,
but often all you need to do is run the program repeatedly,
watching for each exception and then implementing dummy
functions/objects that basically trick the calling routines
into thinking everything is working fine. No need to edit
the original source at all!

Consider it your first foray into test-driven development,
since in effect that's what you would be doing. ;-)

-Peter
 
R

Robert Kern

Lynn said:
Lynn wrote:




Nope. If I run from the src (grabbed frm www.pysol.org) I get this stack
trace:
File "pysol.py", line 47, in ?
from main import main
File "/data/apps/pysol-4.82/src/main.py", line 48, in ?
from app import Application
File "/data/apps/pysol-4.82/src/app.py", line 54, in ?
from images import Images, SubsampledImages
File "/data/apps/pysol-4.82/src/images.py", line 47, in ?
from pysoltk import tkversion, loadImage, copyImage, createImage
File "/data/apps/pysol-4.82/src/pysoltk.py", line 81, in ?
exec "from " + m + " import *"
File "<string>", line 1, in ?
File "/data/apps/pysol-4.82/src/tk/soundoptionsdialog.py", line 44, in ?
from pysolaudio import pysolsoundserver
File "/data/apps/pysol-4.82/src/pysolaudio.py", line 44, in ?
import pysolsoundserver
ImportError: No module named pysolsoundserver

If I strip out every instance of importing that module, it eventually dies
with a tk box alerting me thatg the global pysolsoundserver is not defined.

I'm farther along than I've ever been though. :)

My version has

try:
from Pysol import pysolsoundserver
except ImportError:
pysolsoundserver = None

--
Robert Kern
(e-mail address removed)

"In the fields of hell where the grass grows high
Are the graves of dreams allowed to die."
-- Richard Harter
 
M

Marc 'BlackJack' Rintsch

I have a SuSe 9.1 linux box (although this isn't a new issue) with
reasonably up to date everything. When I run PySol, it grabs the sound
system in a rude and complete way.

I don't listen to sound and I NEED my sound system available even if PySol
is running.

Do you have KDE and its sound server running? Then you can try to start
PySol with the ``artsdsp`` wrapper. The program intercepts access to the
low level sound devices in /dev/* and passes the data to the sound server.
See ``artsdsp --help`` for options.

Ciao,
Marc 'BlackJack' Rintsch
 
L

Lynn

Marc said:
Do you have KDE and its sound server running? Then you can try to start
PySol with the ``artsdsp`` wrapper. The program intercepts access to the
low level sound devices in /dev/* and passes the data to the sound server.
See ``artsdsp --help`` for options.

Ciao,
Marc 'BlackJack' Rintsch


Alas, this produces a "artsdsp works only for binaries" error.
 
L

Lynn

Lynn said:
I have a SuSe 9.1 linux box (although this isn't a new issue) with
reasonably up to date everything. When I run PySol, it grabs the sound
system in a rude and complete way.

I don't listen to sound and I NEED my sound system available even if PySol
is running.

Does anyone have a simple way of ripping the sound functionality our of
PySol? I've not enough of a python programmer to deal with this.
Everything I've tried has just generated a ton of errors.

Solved. Not elegant, but solved.

I found several places in the scripts where tests for the presense of
pysolsoundserver were being made. And a couple more places where the
option for sound was being tested. The test returns what ever it returns,
but I just force the answer to always be "failed" and "nosound."

I think there were five places to change an assignment statement.

Thanks to everyone for your responses. It helped. I learned more about
python than I intended. And that can't be bad. :)
 
C

carl.lowenstein

# chmod 000 /usr/lib/python2.3/site-packages/pysolsoundserver.so
crude but very effective.

carl
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top