Esound, Popt
- From: canek abulafia fciencias unam mx (Canek Peláez Valdés)
- To: gnome-list gnome org
- Subject: Esound, Popt
- Date: 04 Sep 1999 05:33:47 -0500
Hi everyone.
I'm developing a little app for GNOME (a front-end for Snes9X, you can see
it in http://abulafia.fciencias.unam.mx/~canek/gsnes9x, if someone cares).
The thing is, Snes9X needs the /dev/dsp device and it's not Esound
compliant. So, before exec()'d Snes9X, I call esd_standby, and after I call
esd_resume (using gnome_sound_connection, of course).
In the first place, that doesn't work _ever_ with non-root users. With
"ever" I meant that sometimes works, and sometimes not. I can't reproduce
it.
If I run esd with the '-terminate' option (or doing the same thing with the
ESD_SPAWN_OPTIONS environment variable), it always works (but I'm not sure
if it works because the esd_standby/resume functions, or because the daemon
frees the device).
So, my first question is if those functions (esd_standby/resume) work in
the same way for root and non-root users.
My second question is if the gnome_sound_init() function is called
automatically by gnome_init() and gnome_init_with_popt_table() functions,
because if my program doesn't call the function by itself, then VERY
strange things happen.
And my third question is about popt: dealing with all this stuff, I see
that gnome_sound_init() needs the esd server name, and that one of the
defaults command line options for GNOME apps is '--espeaker=HOSTNAME:PORT'
(that's why I ask if gnome_sound_init is called automatically).
Then, if every app that requires sound needs to call gnome_sound_init, it
will be nice that it could use the default option for get the
hostname... but I can't get the HOSTNAME option using the popt functions
(or I can't find the correct function).
Currently, I'm using the old simple method:
for (i = 0; i < argc; i++) {
if (!strncmp ("--espeaker=", argv[i], strlen ("--espeaker=")))
etc...
There is a popt-related function that do it for me?
I'm a very very lazy boy :)
Thanks in advance.
Canek Peláez Valdés
Facultad de Ciencias
Universidad Nacional Autónoma de México
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]