Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

stopping the sound server in PySol code -- how?
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.

--
Peace, Love and Absolute Pleasure
Crazed Imaginations RHPS cast
www.crazedimaginations.net

Report this thread to moderator Post Follow-up to this message
Old Post
Lynn
11-20-04 08:58 AM


Re: stopping the sound server in PySol code -- how?
Lynn wrote:
> 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
rkern@ucsd.edu

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

Report this thread to moderator Post Follow-up to this message
Old Post
Robert Kern
11-20-04 08:58 AM


Re: stopping the sound server in PySol code -- how?
Robert Kern wrote:

> Lynn wrote: 
>
> 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.

--
Peace, Love and Absolute Pleasure
Crazed Imaginations RHPS cast
www.crazedimaginations.net

Report this thread to moderator Post Follow-up to this message
Old Post
Lynn
11-20-04 08:58 AM


Re: stopping the sound server in PySol code -- how?
Lynn wrote:

> 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. :)

--
Peace, Love and Absolute Pleasure
Crazed Imaginations RHPS cast
www.crazedimaginations.net

Report this thread to moderator Post Follow-up to this message
Old Post
Lynn
11-20-04 01:56 PM


Re: stopping the sound server in PySol code -- how?
Lynn wrote:

> 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.


--
Regards,

Diez B. Roggisch

Report this thread to moderator Post Follow-up to this message
Old Post
Diez B. Roggisch
11-20-04 08:56 PM


Re: stopping the sound server in PySol code -- how?
Lynn wrote:
> 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.[/color
]

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

Report this thread to moderator Post Follow-up to this message
Old Post
Peter Hansen
11-20-04 08:56 PM


Re: stopping the sound server in PySol code -- how?
Lynn wrote:
> 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
rkern@ucsd.edu

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

Report this thread to moderator Post Follow-up to this message
Old Post
Robert Kern
11-20-04 08:56 PM


Re: stopping the sound server in PySol code -- how?
In <iqAnd.69632$SW3.42915@fed1read01>, Lynn wrote:

> 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

Report this thread to moderator Post Follow-up to this message
Old Post
Marc 'BlackJack' Rintsch
11-20-04 08:57 PM


Re: stopping the sound server in PySol code -- how?
Marc 'BlackJack' Rintsch wrote:

> In <iqAnd.69632$SW3.42915@fed1read01>, Lynn wrote:
> 
>
> 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.
--
Peace, Love and Absolute Pleasure
Crazed Imaginations RHPS cast
www.crazedimaginations.net

Report this thread to moderator Post Follow-up to this message
Old Post
Lynn
11-20-04 08:57 PM


Re: stopping the sound server in PySol code -- how?
# chmod 000 /usr/lib/python2.3/site-packages/pysolsoundserver.so
crude but very effective.

carl


Report this thread to moderator Post Follow-up to this message
Old Post
carl.lowenstein@gmail.com
01-12-05 08:57 AM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

Python archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 09:13 PM.

 

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.