s/POLYP/PULSE/g

git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1041 fefdeb5f-60dc-0310-8127-8f9354f1896f
This commit is contained in:
Lennart Poettering 2006-06-19 23:56:54 +00:00
parent 6654e987c1
commit 230f97a4a4
12 changed files with 87 additions and 87 deletions

View file

@ -36,11 +36,11 @@ AC_SUBST(PACKAGE_URL, [http://0pointer.de/lennart/projects/pulseaudio/])
AC_SUBST(PA_API_VERSION, 9) AC_SUBST(PA_API_VERSION, 9)
AC_SUBST(PA_PROTOCOL_VERSION, 9) AC_SUBST(PA_PROTOCOL_VERSION, 9)
AC_SUBST(LIBPOLYP_VERSION_INFO, [0:0:0]) AC_SUBST(LIBPULSE_VERSION_INFO, [0:0:0])
AC_SUBST(LIBPOLYPCORE_VERSION_INFO, [0:1:0]) AC_SUBST(LIBPULSECORE_VERSION_INFO, [0:1:0])
AC_SUBST(LIBPOLYP_SIMPLE_VERSION_INFO, [0:0:0]) AC_SUBST(LIBPULSE_SIMPLE_VERSION_INFO, [0:0:0])
AC_SUBST(LIBPOLYP_BROWSE_VERSION_INFO, [0:0:0]) AC_SUBST(LIBPULSE_BROWSE_VERSION_INFO, [0:0:0])
AC_SUBST(LIBPOLYP_MAINLOOP_GLIB_VERSION_INFO, [0:0:0]) AC_SUBST(LIBPULSE_MAINLOOP_GLIB_VERSION_INFO, [0:0:0])
if type -p stow > /dev/null && test -d /usr/local/stow ; then if type -p stow > /dev/null && test -d /usr/local/stow ; then
AC_MSG_NOTICE([*** Found /usr/local/stow: default install prefix set to /usr/local/stow/${PACKAGE_NAME}-${PACKAGE_VERSION} ***]) AC_MSG_NOTICE([*** Found /usr/local/stow: default install prefix set to /usr/local/stow/${PACKAGE_NAME}-${PACKAGE_VERSION} ***])

View file

@ -103,7 +103,7 @@ in <tt>~/.pulse/</tt>.</p></li>
<li><p><b>How do I use PulseAudio over the network?</b></p> <li><p><b>How do I use PulseAudio over the network?</b></p>
<p>Just set <tt>$POLYP_SERVER</tt> to the host name of the PulseAudio <p>Just set <tt>$PULSE_SERVER</tt> to the host name of the PulseAudio
server. For authentication you need the same auth cookies on all sides. For server. For authentication you need the same auth cookies on all sides. For
that copy <tt>~./pulse-cookie</tt> to all clients that shall that copy <tt>~./pulse-cookie</tt> to all clients that shall
be allowed to connect.</p> be allowed to connect.</p>
@ -116,9 +116,9 @@ be allowed to connect.</p>
<li><p><b>What environment variables does PulseAudio care about?</b></p> <li><p><b>What environment variables does PulseAudio care about?</b></p>
<p>The client honors: <tt>POLYP_SINK</tt> (default sink to connect to), <tt>POLYP_SOURCE</tt> (default source to connect to), <tt>POLYP_SERVER</tt> (default server to connect to, like <tt>ESPEAKER</tt>), <tt>POLYP_BINARY</tt> (the binary to start when autospawning a daemon), <tt>POLYP_CLIENTCONFIG</tt> (path to the client configuration file).</p> <p>The client honors: <tt>PULSE_SINK</tt> (default sink to connect to), <tt>PULSE_SOURCE</tt> (default source to connect to), <tt>PULSE_SERVER</tt> (default server to connect to, like <tt>ESPEAKER</tt>), <tt>PULSE_BINARY</tt> (the binary to start when autospawning a daemon), <tt>PULSE_CLIENTCONFIG</tt> (path to the client configuration file).</p>
<p>The daemon honors: <tt>POLYP_SCRIPT</tt> (default CLI script file run after startup), <tt>POLYP_CONFIG</tt> (default daemon configuration file), <tt>POLYP_DLPATH</tt> (colon separated list of paths where to look for modules)</p></li> <p>The daemon honors: <tt>PULSE_SCRIPT</tt> (default CLI script file run after startup), <tt>PULSE_CONFIG</tt> (default daemon configuration file), <tt>PULSE_DLPATH</tt> (colon separated list of paths where to look for modules)</p></li>
<li><p><b>I saw that SIGUSR2 provokes loading of the module <tt>module-cli-protocol-unix</tt>. But how do I make use of that?</b></p> <li><p><b>I saw that SIGUSR2 provokes loading of the module <tt>module-cli-protocol-unix</tt>. But how do I make use of that?</b></p>
@ -140,8 +140,8 @@ bidilink unix-client:/tmp/pulse-$USER/cli</pre>
<p>The following rule applies:</p> <p>The following rule applies:</p>
<ol> <ol>
<li>If the the application using the library specifies a server to connect to it is used. If the connection fails, the library fails too.</li> <li>If the the application using the library specifies a server to connect to it is used. If the connection fails, the library fails too.</li>
<li>If the environment variable <tt>POLYP_SERVER</tt> is defined the library connects to that server. If the connection fails, the library fails too.</li> <li>If the environment variable <tt>PULSE_SERVER</tt> is defined the library connects to that server. If the connection fails, the library fails too.</li>
<li>If <tt>$DISPLAY</tt> is set, the library tries to connect to that server and looks for the root window property <tt>POYLP_SERVER</tt> for the host to connect to. If <tt>POLYP_COOKIE</tt> is set it is used as authentication cookie.</li> <li>If <tt>$DISPLAY</tt> is set, the library tries to connect to that server and looks for the root window property <tt>POYLP_SERVER</tt> for the host to connect to. If <tt>PULSE_COOKIE</tt> is set it is used as authentication cookie.</li>
<li>If the client configuration file (<tt>~/.pulse/client.conf</tt> or <tt>/etc/pulse/client.conf</tt>) sets the server address, the library connects to that server. If the connection fails, the library fails too.</li> <li>If the client configuration file (<tt>~/.pulse/client.conf</tt> or <tt>/etc/pulse/client.conf</tt>) sets the server address, the library connects to that server. If the connection fails, the library fails too.</li>
<li>The library tries to connect to the default local UNIX socket for PulseAudio servers. If the connection fails, it proceeds with the next item.</li> <li>The library tries to connect to the default local UNIX socket for PulseAudio servers. If the connection fails, it proceeds with the next item.</li>
<li>The library tries to connect to the default local TCP socket for PulseAudio servers. If the connection fails, it proceeds with the next item.</li> <li>The library tries to connect to the default local TCP socket for PulseAudio servers. If the connection fails, it proceeds with the next item.</li>

View file

@ -314,8 +314,8 @@ as <tt>module-cli-protocol-tcp</tt>.</p>
<p>Publishes the access credentials to the Polypaudio server in the <p>Publishes the access credentials to the Polypaudio server in the
X11 root window. The following properties are used: X11 root window. The following properties are used:
<tt>POLYP_SERVER</tt>, <tt>POYLP_SINK</tt>, <tt>POLYP_SOURCE</tt>, <tt>PULSE_SERVER</tt>, <tt>POYLP_SINK</tt>, <tt>PULSE_SOURCE</tt>,
<tt>POLYP_COOKIE</tt>. This is very useful when using SSH or any other <tt>PULSE_COOKIE</tt>. This is very useful when using SSH or any other
remote login tool for logging into other machines and getting audio remote login tool for logging into other machines and getting audio
playback to your local speakers. The Polypaudio client libraries make playback to your local speakers. The Polypaudio client libraries make
use of this data automatically. Instead of using this module you may use of this data automatically. Instead of using this module you may

View file

@ -30,9 +30,9 @@ pulseconfdir=$(sysconfdir)/pulse
# Defines # # Defines #
################################### ###################################
POLYPAUDIO_BINARY=$(bindir)/pulseaudio$(EXEEXT) PULSEAUDIO_BINARY=$(bindir)/pulseaudio$(EXEEXT)
if OS_IS_WIN32 if OS_IS_WIN32
DEFAULT_CONFIG_DIR=%POLYP_ROOT% DEFAULT_CONFIG_DIR=%PULSE_ROOT%
else else
DEFAULT_CONFIG_DIR=$(pulseconfdir) DEFAULT_CONFIG_DIR=$(pulseconfdir)
endif endif
@ -48,7 +48,7 @@ AM_CFLAGS += $(LIBSAMPLERATE_CFLAGS) $(LIBSNDFILE_CFLAGS)
AM_CFLAGS += -DDLSEARCHPATH=\"$(modlibexecdir)\" AM_CFLAGS += -DDLSEARCHPATH=\"$(modlibexecdir)\"
#AM_CFLAGS += -DDLSEARCHPATH=\"$(shell pwd)\" #AM_CFLAGS += -DDLSEARCHPATH=\"$(shell pwd)\"
AM_CFLAGS += -DDEFAULT_CONFIG_DIR=\"$(DEFAULT_CONFIG_DIR)\" AM_CFLAGS += -DDEFAULT_CONFIG_DIR=\"$(DEFAULT_CONFIG_DIR)\"
AM_CFLAGS += -DPOLYPAUDIO_BINARY=\"$(POLYPAUDIO_BINARY)\" AM_CFLAGS += -DPULSEAUDIO_BINARY=\"$(PULSEAUDIO_BINARY)\"
# This cool debug trap works on i386/gcc only # This cool debug trap works on i386/gcc only
AM_CFLAGS += '-DDEBUG_TRAP=__asm__("int $$3")' AM_CFLAGS += '-DDEBUG_TRAP=__asm__("int $$3")'
@ -426,7 +426,7 @@ libpulse_la_SOURCES += \
endif endif
libpulse_la_CFLAGS = $(AM_CFLAGS) libpulse_la_CFLAGS = $(AM_CFLAGS)
libpulse_la_LDFLAGS = -version-info $(LIBPOLYP_VERSION_INFO) libpulse_la_LDFLAGS = -version-info $(LIBPULSE_VERSION_INFO)
libpulse_la_LIBADD = $(AM_LIBADD) $(WINSOCK_LIBS) $(LIBICONV) libpulse_la_LIBADD = $(AM_LIBADD) $(WINSOCK_LIBS) $(LIBICONV)
if HAVE_X11 if HAVE_X11
@ -442,22 +442,22 @@ endif
libpulse_simple_la_SOURCES = pulse/simple.c pulse/simple.h libpulse_simple_la_SOURCES = pulse/simple.c pulse/simple.h
libpulse_simple_la_CFLAGS = $(AM_CFLAGS) libpulse_simple_la_CFLAGS = $(AM_CFLAGS)
libpulse_simple_la_LIBADD = $(AM_LIBADD) libpulse.la libpulse_simple_la_LIBADD = $(AM_LIBADD) libpulse.la
libpulse_simple_la_LDFLAGS = -version-info $(LIBPOLYP_SIMPLE_VERSION_INFO) libpulse_simple_la_LDFLAGS = -version-info $(LIBPULSE_SIMPLE_VERSION_INFO)
libpulse_browse_la_SOURCES = pulse/browser.c pulse/browser.h libpulse_browse_la_SOURCES = pulse/browser.c pulse/browser.h
libpulse_browse_la_CFLAGS = $(AM_CFLAGS) $(HOWL_CFLAGS) libpulse_browse_la_CFLAGS = $(AM_CFLAGS) $(HOWL_CFLAGS)
libpulse_browse_la_LIBADD = $(AM_LIBADD) libpulse.la $(HOWL_LIBS) libpulse_browse_la_LIBADD = $(AM_LIBADD) libpulse.la $(HOWL_LIBS)
libpulse_browse_la_LDFLAGS = -version-info $(LIBPOLYP_BROWSE_VERSION_INFO) libpulse_browse_la_LDFLAGS = -version-info $(LIBPULSE_BROWSE_VERSION_INFO)
libpulse_mainloop_glib_la_SOURCES = pulse/glib-mainloop.h pulse/glib-mainloop.c libpulse_mainloop_glib_la_SOURCES = pulse/glib-mainloop.h pulse/glib-mainloop.c
libpulse_mainloop_glib_la_CFLAGS = $(AM_CFLAGS) $(GLIB20_CFLAGS) libpulse_mainloop_glib_la_CFLAGS = $(AM_CFLAGS) $(GLIB20_CFLAGS)
libpulse_mainloop_glib_la_LIBADD = $(AM_LIBADD) libpulse.la $(GLIB20_LIBS) libpulse_mainloop_glib_la_LIBADD = $(AM_LIBADD) libpulse.la $(GLIB20_LIBS)
libpulse_mainloop_glib_la_LDFLAGS = -version-info $(LIBPOLYP_MAINLOOP_GLIB_VERSION_INFO) libpulse_mainloop_glib_la_LDFLAGS = -version-info $(LIBPULSE_MAINLOOP_GLIB_VERSION_INFO)
libpulse_mainloop_glib12_la_SOURCES = pulse/glib-mainloop.h pulse/glib12-mainloop.c libpulse_mainloop_glib12_la_SOURCES = pulse/glib-mainloop.h pulse/glib12-mainloop.c
libpulse_mainloop_glib12_la_CFLAGS = $(AM_CFLAGS) $(GLIB12_CFLAGS) libpulse_mainloop_glib12_la_CFLAGS = $(AM_CFLAGS) $(GLIB12_CFLAGS)
libpulse_mainloop_glib12_la_LIBADD = $(AM_LIBADD) libpulse.la $(GLIB12_LIBS) libpulse_mainloop_glib12_la_LIBADD = $(AM_LIBADD) libpulse.la $(GLIB12_LIBS)
libpulse_mainloop_glib12_la_LDFLAGS = -version-info $(LIBPOLYP_MAINLOOP_GLIB_VERSION_INFO) libpulse_mainloop_glib12_la_LDFLAGS = -version-info $(LIBPULSE_MAINLOOP_GLIB_VERSION_INFO)
################################### ###################################
# OSS emulation # # OSS emulation #
@ -593,7 +593,7 @@ libpulsecore_la_SOURCES += \
endif endif
libpulsecore_la_CPPFLAGS = $(AM_CPPFLAGS) $(LIBOIL_CFLAGS) libpulsecore_la_CPPFLAGS = $(AM_CPPFLAGS) $(LIBOIL_CFLAGS)
libpulsecore_la_LDFLAGS = -version-info $(LIBPOLYPCORE_VERSION_INFO) libpulsecore_la_LDFLAGS = -version-info $(LIBPULSECORE_VERSION_INFO)
libpulsecore_la_LIBADD = $(AM_LIBADD) $(LIBLTDL) $(LIBSAMPLERATE_LIBS) $(LIBSNDFILE_LIBS) $(WINSOCK_LIBS) $(LIBOIL_LIBS) $(LIBICONV) libpulsecore_la_LIBADD = $(AM_LIBADD) $(LIBLTDL) $(LIBSAMPLERATE_LIBS) $(LIBSNDFILE_LIBS) $(WINSOCK_LIBS) $(LIBOIL_LIBS) $(LIBICONV)
################################### ###################################
@ -1177,17 +1177,17 @@ CLEANFILES = esdcompat client.conf default.pa daemon.conf
esdcompat: daemon/esdcompat.in Makefile esdcompat: daemon/esdcompat.in Makefile
sed -e 's,@PACKAGE_VERSION\@,$(PACKAGE_VERSION),g' \ sed -e 's,@PACKAGE_VERSION\@,$(PACKAGE_VERSION),g' \
-e 's,@PACKAGE_NAME\@,$(PACKAGE_NAME),g' \ -e 's,@PACKAGE_NAME\@,$(PACKAGE_NAME),g' \
-e 's,@POLYPAUDIO_BINARY\@,$(POLYPAUDIO_BINARY),g' < $< > $@ -e 's,@PULSEAUDIO_BINARY\@,$(PULSEAUDIO_BINARY),g' < $< > $@
client.conf: pulse/client.conf.in Makefile client.conf: pulse/client.conf.in Makefile
sed -e 's,@POLYPAUDIO_BINARY\@,$(POLYPAUDIO_BINARY),g' < $< > $@ sed -e 's,@PULSEAUDIO_BINARY\@,$(PULSEAUDIO_BINARY),g' < $< > $@
if OS_IS_WIN32 if OS_IS_WIN32
default.pa: daemon/default.pa.win32 default.pa: daemon/default.pa.win32
cp $< $@ cp $< $@
else else
default.pa: daemon/default.pa.in Makefile default.pa: daemon/default.pa.in Makefile
sed -e 's,@POLYPAUDIO_BINARY\@,$(POLYPAUDIO_BINARY),g' < $< > $@ sed -e 's,@PULSEAUDIO_BINARY\@,$(PULSEAUDIO_BINARY),g' < $< > $@
endif endif
daemon.conf: daemon/daemon.conf.in Makefile daemon.conf: daemon/daemon.conf.in Makefile

View file

@ -43,7 +43,7 @@
# ifndef OS_IS_WIN32 # ifndef OS_IS_WIN32
# define DEFAULT_CONFIG_DIR "/etc/pulse" # define DEFAULT_CONFIG_DIR "/etc/pulse"
# else # else
# define DEFAULT_CONFIG_DIR "%POLYP_ROOT%" # define DEFAULT_CONFIG_DIR "%PULSE_ROOT%"
# endif # endif
#endif #endif
@ -58,9 +58,9 @@
#define DEFAULT_CONFIG_FILE DEFAULT_CONFIG_DIR PATH_SEP "daemon.conf" #define DEFAULT_CONFIG_FILE DEFAULT_CONFIG_DIR PATH_SEP "daemon.conf"
#define DEFAULT_CONFIG_FILE_USER ".pulse" PATH_SEP "daemon.conf" #define DEFAULT_CONFIG_FILE_USER ".pulse" PATH_SEP "daemon.conf"
#define ENV_SCRIPT_FILE "POLYP_SCRIPT" #define ENV_SCRIPT_FILE "PULSE_SCRIPT"
#define ENV_CONFIG_FILE "POLYP_CONFIG" #define ENV_CONFIG_FILE "PULSE_CONFIG"
#define ENV_DL_SEARCH_PATH "POLYP_DLPATH" #define ENV_DL_SEARCH_PATH "PULSE_DLPATH"
static const pa_daemon_conf default_conf = { static const pa_daemon_conf default_conf = {
.cmd = PA_CMD_DAEMON, .cmd = PA_CMD_DAEMON,

View file

@ -128,22 +128,22 @@ int pa__init(pa_core *c, pa_module*m) {
goto fail; goto fail;
s = pa_strlist_tostring(l); s = pa_strlist_tostring(l);
pa_x11_set_prop(pa_x11_wrapper_get_display(u->x11_wrapper), "POLYP_SERVER", s); pa_x11_set_prop(pa_x11_wrapper_get_display(u->x11_wrapper), "PULSE_SERVER", s);
pa_xfree(s); pa_xfree(s);
if (!pa_get_fqdn(hn, sizeof(hn)) || !pa_get_user_name(un, sizeof(un))) if (!pa_get_fqdn(hn, sizeof(hn)) || !pa_get_user_name(un, sizeof(un)))
goto fail; goto fail;
u->id = pa_sprintf_malloc("%s@%s/%u", un, hn, (unsigned) getpid()); u->id = pa_sprintf_malloc("%s@%s/%u", un, hn, (unsigned) getpid());
pa_x11_set_prop(pa_x11_wrapper_get_display(u->x11_wrapper), "POLYP_ID", u->id); pa_x11_set_prop(pa_x11_wrapper_get_display(u->x11_wrapper), "PULSE_ID", u->id);
if ((t = pa_modargs_get_value(ma, "source", NULL))) if ((t = pa_modargs_get_value(ma, "source", NULL)))
pa_x11_set_prop(pa_x11_wrapper_get_display(u->x11_wrapper), "POLYP_SOURCE", t); pa_x11_set_prop(pa_x11_wrapper_get_display(u->x11_wrapper), "PULSE_SOURCE", t);
if ((t = pa_modargs_get_value(ma, "sink", NULL))) if ((t = pa_modargs_get_value(ma, "sink", NULL)))
pa_x11_set_prop(pa_x11_wrapper_get_display(u->x11_wrapper), "POLYP_SINK", t); pa_x11_set_prop(pa_x11_wrapper_get_display(u->x11_wrapper), "PULSE_SINK", t);
pa_x11_set_prop(pa_x11_wrapper_get_display(u->x11_wrapper), "POLYP_COOKIE", pa_hexstr(u->auth_cookie, sizeof(u->auth_cookie), hx, sizeof(hx))); pa_x11_set_prop(pa_x11_wrapper_get_display(u->x11_wrapper), "PULSE_COOKIE", pa_hexstr(u->auth_cookie, sizeof(u->auth_cookie), hx, sizeof(hx)));
pa_modargs_free(ma); pa_modargs_free(ma);
return 0; return 0;
@ -167,14 +167,14 @@ void pa__done(pa_core *c, pa_module*m) {
char t[256]; char t[256];
/* Yes, here is a race condition */ /* Yes, here is a race condition */
if (!pa_x11_get_prop(pa_x11_wrapper_get_display(u->x11_wrapper), "POLYP_ID", t, sizeof(t)) || strcmp(t, u->id)) if (!pa_x11_get_prop(pa_x11_wrapper_get_display(u->x11_wrapper), "PULSE_ID", t, sizeof(t)) || strcmp(t, u->id))
pa_log_warn(__FILE__": PulseAudio information vanished from X11!"); pa_log_warn(__FILE__": PulseAudio information vanished from X11!");
else { else {
pa_x11_del_prop(pa_x11_wrapper_get_display(u->x11_wrapper), "POLYP_ID"); pa_x11_del_prop(pa_x11_wrapper_get_display(u->x11_wrapper), "PULSE_ID");
pa_x11_del_prop(pa_x11_wrapper_get_display(u->x11_wrapper), "POLYP_SERVER"); pa_x11_del_prop(pa_x11_wrapper_get_display(u->x11_wrapper), "PULSE_SERVER");
pa_x11_del_prop(pa_x11_wrapper_get_display(u->x11_wrapper), "POLYP_SINK"); pa_x11_del_prop(pa_x11_wrapper_get_display(u->x11_wrapper), "PULSE_SINK");
pa_x11_del_prop(pa_x11_wrapper_get_display(u->x11_wrapper), "POLYP_SOURCE"); pa_x11_del_prop(pa_x11_wrapper_get_display(u->x11_wrapper), "PULSE_SOURCE");
pa_x11_del_prop(pa_x11_wrapper_get_display(u->x11_wrapper), "POLYP_COOKIE"); pa_x11_del_prop(pa_x11_wrapper_get_display(u->x11_wrapper), "PULSE_COOKIE");
XSync(pa_x11_wrapper_get_display(u->x11_wrapper), False); XSync(pa_x11_wrapper_get_display(u->x11_wrapper), False);
} }
} }

View file

@ -50,22 +50,22 @@ int pa_client_conf_from_x11(pa_client_conf *c, const char *dname) {
goto finish; goto finish;
} }
if (pa_x11_get_prop(d, "POLYP_SERVER", t, sizeof(t))) { if (pa_x11_get_prop(d, "PULSE_SERVER", t, sizeof(t))) {
pa_xfree(c->default_server); pa_xfree(c->default_server);
c->default_server = pa_xstrdup(t); c->default_server = pa_xstrdup(t);
} }
if (pa_x11_get_prop(d, "POLYP_SINK", t, sizeof(t))) { if (pa_x11_get_prop(d, "PULSE_SINK", t, sizeof(t))) {
pa_xfree(c->default_sink); pa_xfree(c->default_sink);
c->default_sink = pa_xstrdup(t); c->default_sink = pa_xstrdup(t);
} }
if (pa_x11_get_prop(d, "POLYP_SOURCE", t, sizeof(t))) { if (pa_x11_get_prop(d, "PULSE_SOURCE", t, sizeof(t))) {
pa_xfree(c->default_source); pa_xfree(c->default_source);
c->default_source = pa_xstrdup(t); c->default_source = pa_xstrdup(t);
} }
if (pa_x11_get_prop(d, "POLYP_COOKIE", t, sizeof(t))) { if (pa_x11_get_prop(d, "PULSE_COOKIE", t, sizeof(t))) {
uint8_t cookie[PA_NATIVE_COOKIE_LENGTH]; uint8_t cookie[PA_NATIVE_COOKIE_LENGTH];
if (pa_parsehex(t, cookie, sizeof(cookie)) != sizeof(cookie)) { if (pa_parsehex(t, cookie, sizeof(cookie)) != sizeof(cookie)) {

View file

@ -43,7 +43,7 @@
# ifndef OS_IS_WIN32 # ifndef OS_IS_WIN32
# define DEFAULT_CONFIG_DIR "/etc/pulse" # define DEFAULT_CONFIG_DIR "/etc/pulse"
# else # else
# define DEFAULT_CONFIG_DIR "%POLYP_ROOT%" # define DEFAULT_CONFIG_DIR "%PULSE_ROOT%"
# endif # endif
#endif #endif
@ -56,12 +56,12 @@
#define DEFAULT_CLIENT_CONFIG_FILE DEFAULT_CONFIG_DIR PATH_SEP "client.conf" #define DEFAULT_CLIENT_CONFIG_FILE DEFAULT_CONFIG_DIR PATH_SEP "client.conf"
#define DEFAULT_CLIENT_CONFIG_FILE_USER ".pulse" PATH_SEP "client.conf" #define DEFAULT_CLIENT_CONFIG_FILE_USER ".pulse" PATH_SEP "client.conf"
#define ENV_CLIENT_CONFIG_FILE "POLYP_CLIENTCONFIG" #define ENV_CLIENT_CONFIG_FILE "PULSE_CLIENTCONFIG"
#define ENV_DEFAULT_SINK "POLYP_SINK" #define ENV_DEFAULT_SINK "PULSE_SINK"
#define ENV_DEFAULT_SOURCE "POLYP_SOURCE" #define ENV_DEFAULT_SOURCE "PULSE_SOURCE"
#define ENV_DEFAULT_SERVER "POLYP_SERVER" #define ENV_DEFAULT_SERVER "PULSE_SERVER"
#define ENV_DAEMON_BINARY "POLYP_BINARY" #define ENV_DAEMON_BINARY "PULSE_BINARY"
#define ENV_COOKIE_FILE "POLYP_COOKIE" #define ENV_COOKIE_FILE "PULSE_COOKIE"
static const pa_client_conf default_conf = { static const pa_client_conf default_conf = {
.daemon_binary = NULL, .daemon_binary = NULL,
@ -77,7 +77,7 @@ static const pa_client_conf default_conf = {
pa_client_conf *pa_client_conf_new(void) { pa_client_conf *pa_client_conf_new(void) {
pa_client_conf *c = pa_xmemdup(&default_conf, sizeof(default_conf)); pa_client_conf *c = pa_xmemdup(&default_conf, sizeof(default_conf));
c->daemon_binary = pa_xstrdup(POLYPAUDIO_BINARY); c->daemon_binary = pa_xstrdup(PULSEAUDIO_BINARY);
c->extra_arguments = pa_xstrdup("--log-target=syslog --exit-idle-time=5"); c->extra_arguments = pa_xstrdup("--log-target=syslog --exit-idle-time=5");
c->cookie_file = pa_xstrdup(PA_NATIVE_COOKIE_FILE); c->cookie_file = pa_xstrdup(PA_NATIVE_COOKIE_FILE);

View file

@ -88,14 +88,14 @@
#ifdef OS_IS_WIN32 #ifdef OS_IS_WIN32
#define POLYP_ROOTENV "POLYP_ROOT" #define PULSE_ROOTENV "PULSE_ROOT"
int pa_set_root(HANDLE handle) { int pa_set_root(HANDLE handle) {
char library_path[MAX_PATH + sizeof(POLYP_ROOTENV) + 1], *sep; char library_path[MAX_PATH + sizeof(PULSE_ROOTENV) + 1], *sep;
strcpy(library_path, POLYP_ROOTENV "="); strcpy(library_path, PULSE_ROOTENV "=");
if (!GetModuleFileName(handle, library_path + sizeof(POLYP_ROOTENV), MAX_PATH)) if (!GetModuleFileName(handle, library_path + sizeof(PULSE_ROOTENV), MAX_PATH))
return 0; return 0;
sep = strrchr(library_path, '\\'); sep = strrchr(library_path, '\\');
@ -818,7 +818,7 @@ FILE *pa_open_config_file(const char *global, const char *local, const char *env
#ifdef OS_IS_WIN32 #ifdef OS_IS_WIN32
char buf[PATH_MAX]; char buf[PATH_MAX];
if (!getenv(POLYP_ROOTENV)) if (!getenv(PULSE_ROOTENV))
pa_set_root(NULL); pa_set_root(NULL);
#endif #endif

View file

@ -40,7 +40,7 @@
#include "log.h" #include "log.h"
#define ENV_LOGLEVEL "POLYP_LOG" #define ENV_LOGLEVEL "PULSE_LOG"
static char *log_ident = NULL, *log_ident_local = NULL; static char *log_ident = NULL, *log_ident_local = NULL;
static pa_log_target_t log_target = PA_LOG_STDERR; static pa_log_target_t log_target = PA_LOG_STDERR;

View file

@ -1500,7 +1500,7 @@ static int mixer_ioctl(fd_info *i, unsigned long request, void*argp, int *_errno
debug(DEBUG_LEVEL_NORMAL, __FILE__": SOUND_MIXER_INFO\n"); debug(DEBUG_LEVEL_NORMAL, __FILE__": SOUND_MIXER_INFO\n");
memset(mi, 0, sizeof(mixer_info)); memset(mi, 0, sizeof(mixer_info));
strncpy(mi->id, "POLYPAUDIO", sizeof(mi->id)); strncpy(mi->id, "PULSEAUDIO", sizeof(mi->id));
strncpy(mi->name, "PulseAudio Virtual OSS", sizeof(mi->name)); strncpy(mi->name, "PulseAudio Virtual OSS", sizeof(mi->name));
pa_threaded_mainloop_lock(i->mainloop); pa_threaded_mainloop_lock(i->mainloop);
mi->modify_counter = i->volume_modify_count; mi->modify_counter = i->volume_modify_count;

View file

@ -99,13 +99,13 @@ int main(int argc, char *argv[]) {
switch (mode) { switch (mode) {
case DUMP: { case DUMP: {
char t[1024]; char t[1024];
if (pa_x11_get_prop(d, "POLYP_SERVER", t, sizeof(t))) if (pa_x11_get_prop(d, "PULSE_SERVER", t, sizeof(t)))
printf("Server: %s\n", t); printf("Server: %s\n", t);
if (pa_x11_get_prop(d, "POLYP_SOURCE", t, sizeof(t))) if (pa_x11_get_prop(d, "PULSE_SOURCE", t, sizeof(t)))
printf("Source: %s\n", t); printf("Source: %s\n", t);
if (pa_x11_get_prop(d, "POLYP_SINK", t, sizeof(t))) if (pa_x11_get_prop(d, "PULSE_SINK", t, sizeof(t)))
printf("Sink: %s\n", t); printf("Sink: %s\n", t);
if (pa_x11_get_prop(d, "POLYP_COOKIE", t, sizeof(t))) if (pa_x11_get_prop(d, "PULSE_COOKIE", t, sizeof(t)))
printf("Cookie: %s\n", t); printf("Cookie: %s\n", t);
break; break;
@ -113,14 +113,14 @@ int main(int argc, char *argv[]) {
case IMPORT: { case IMPORT: {
char t[1024]; char t[1024];
if (pa_x11_get_prop(d, "POLYP_SERVER", t, sizeof(t))) if (pa_x11_get_prop(d, "PULSE_SERVER", t, sizeof(t)))
printf("POLYP_SERVER='%s'\nexport POLYP_SERVER\n", t); printf("PULSE_SERVER='%s'\nexport PULSE_SERVER\n", t);
if (pa_x11_get_prop(d, "POLYP_SOURCE", t, sizeof(t))) if (pa_x11_get_prop(d, "PULSE_SOURCE", t, sizeof(t)))
printf("POLYP_SOURCE='%s'\nexport POLYP_SOURCE\n", t); printf("PULSE_SOURCE='%s'\nexport PULSE_SOURCE\n", t);
if (pa_x11_get_prop(d, "POLYP_SINK", t, sizeof(t))) if (pa_x11_get_prop(d, "PULSE_SINK", t, sizeof(t)))
printf("POLYP_SINK='%s'\nexport POLYP_SINK\n", t); printf("PULSE_SINK='%s'\nexport PULSE_SINK\n", t);
if (pa_x11_get_prop(d, "POLYP_COOKIE", t, sizeof(t))) { if (pa_x11_get_prop(d, "PULSE_COOKIE", t, sizeof(t))) {
uint8_t cookie[PA_NATIVE_COOKIE_LENGTH]; uint8_t cookie[PA_NATIVE_COOKIE_LENGTH];
size_t l; size_t l;
if ((l = pa_parsehex(t, cookie, sizeof(cookie))) != sizeof(cookie)) { if ((l = pa_parsehex(t, cookie, sizeof(cookie))) != sizeof(cookie)) {
@ -153,16 +153,16 @@ int main(int argc, char *argv[]) {
goto finish; goto finish;
} }
pa_x11_del_prop(d, "POLYP_SERVER"); pa_x11_del_prop(d, "PULSE_SERVER");
pa_x11_del_prop(d, "POLYP_SINK"); pa_x11_del_prop(d, "PULSE_SINK");
pa_x11_del_prop(d, "POLYP_SOURCE"); pa_x11_del_prop(d, "PULSE_SOURCE");
pa_x11_del_prop(d, "POLYP_ID"); pa_x11_del_prop(d, "PULSE_ID");
pa_x11_del_prop(d, "POLYP_COOKIE"); pa_x11_del_prop(d, "PULSE_COOKIE");
if (server) if (server)
pa_x11_set_prop(d, "POLYP_SERVER", server); pa_x11_set_prop(d, "PULSE_SERVER", server);
else if (conf->default_server) else if (conf->default_server)
pa_x11_set_prop(d, "POLYP_SERVER", conf->default_server); pa_x11_set_prop(d, "PULSE_SERVER", conf->default_server);
else { else {
char hn[256]; char hn[256];
if (!pa_get_fqdn(hn, sizeof(hn))) { if (!pa_get_fqdn(hn, sizeof(hn))) {
@ -170,18 +170,18 @@ int main(int argc, char *argv[]) {
goto finish; goto finish;
} }
pa_x11_set_prop(d, "POLYP_SERVER", hn); pa_x11_set_prop(d, "PULSE_SERVER", hn);
} }
if (sink) if (sink)
pa_x11_set_prop(d, "POLYP_SINK", sink); pa_x11_set_prop(d, "PULSE_SINK", sink);
else if (conf->default_sink) else if (conf->default_sink)
pa_x11_set_prop(d, "POLYP_SINK", conf->default_sink); pa_x11_set_prop(d, "PULSE_SINK", conf->default_sink);
if (source) if (source)
pa_x11_set_prop(d, "POLYP_SOURCE", source); pa_x11_set_prop(d, "PULSE_SOURCE", source);
if (conf->default_source) if (conf->default_source)
pa_x11_set_prop(d, "POLYP_SOURCE", conf->default_source); pa_x11_set_prop(d, "PULSE_SOURCE", conf->default_source);
pa_client_conf_free(conf); pa_client_conf_free(conf);
@ -190,16 +190,16 @@ int main(int argc, char *argv[]) {
goto finish; goto finish;
} }
pa_x11_set_prop(d, "POLYP_COOKIE", pa_hexstr(cookie, sizeof(cookie), hx, sizeof(hx))); pa_x11_set_prop(d, "PULSE_COOKIE", pa_hexstr(cookie, sizeof(cookie), hx, sizeof(hx)));
break; break;
} }
case REMOVE: case REMOVE:
pa_x11_del_prop(d, "POLYP_SERVER"); pa_x11_del_prop(d, "PULSE_SERVER");
pa_x11_del_prop(d, "POLYP_SINK"); pa_x11_del_prop(d, "PULSE_SINK");
pa_x11_del_prop(d, "POLYP_SOURCE"); pa_x11_del_prop(d, "PULSE_SOURCE");
pa_x11_del_prop(d, "POLYP_ID"); pa_x11_del_prop(d, "PULSE_ID");
pa_x11_del_prop(d, "POLYP_COOKIE"); pa_x11_del_prop(d, "PULSE_COOKIE");
break; break;
default: default: