summaryrefslogtreecommitdiffstats
path: root/sesman/chansrv/pulse
diff options
context:
space:
mode:
authorJay Sorg <jay.sorg@gmail.com>2013-03-31 18:06:33 -0700
committerJay Sorg <jay.sorg@gmail.com>2013-03-31 18:06:33 -0700
commit73b074d602993c5e6c9610f33846a4f01a2f3cfe (patch)
tree078655beb2ce3a49d558e36bc3a6511358de774a /sesman/chansrv/pulse
parent2d89ae1f3855997bb1e75f8cde24f227c7342a68 (diff)
downloadxrdp-proprietary-73b074d602993c5e6c9610f33846a4f01a2f3cfe.tar.gz
xrdp-proprietary-73b074d602993c5e6c9610f33846a4f01a2f3cfe.zip
chansrv: work on pulse sink
Diffstat (limited to 'sesman/chansrv/pulse')
-rw-r--r--sesman/chansrv/pulse/module-xrdp-sink.c14
-rw-r--r--sesman/chansrv/pulse/pulse-notes.txt29
2 files changed, 33 insertions, 10 deletions
diff --git a/sesman/chansrv/pulse/module-xrdp-sink.c b/sesman/chansrv/pulse/module-xrdp-sink.c
index 017d757e..92f4b674 100644
--- a/sesman/chansrv/pulse/module-xrdp-sink.c
+++ b/sesman/chansrv/pulse/module-xrdp-sink.c
@@ -262,7 +262,6 @@ static int data_send(struct userdata *u, pa_memchunk *chunk) {
char *data;
int bytes;
int sent;
- int display_num;
int fd;
struct header h;
struct sockaddr_un s;
@@ -276,9 +275,8 @@ static int data_send(struct userdata *u, pa_memchunk *chunk) {
fd = socket(PF_LOCAL, SOCK_STREAM, 0);
memset(&s, 0, sizeof(s));
s.sun_family = AF_UNIX;
- display_num = get_display_num_from_display(getenv("DISPLAY"));
bytes = sizeof(s.sun_path) - 1;
- snprintf(s.sun_path, bytes, CHANSRV_PORT_STR, display_num);
+ snprintf(s.sun_path, bytes, CHANSRV_PORT_STR, u->display_num);
pa_log("trying to conenct to %s", s.sun_path);
if (connect(fd, (struct sockaddr *)&s,
sizeof(struct sockaddr_un)) != 0) {
@@ -296,15 +294,11 @@ static int data_send(struct userdata *u, pa_memchunk *chunk) {
//pa_log("bytes %d", bytes);
/* from rewind */
- if (u->skip_bytes > 0)
- {
- if (bytes > u->skip_bytes)
- {
+ if (u->skip_bytes > 0) {
+ if (bytes > u->skip_bytes) {
bytes -= u->skip_bytes;
u->skip_bytes = 0;
- }
- else
- {
+ } else {
u->skip_bytes -= bytes;
return bytes;
}
diff --git a/sesman/chansrv/pulse/pulse-notes.txt b/sesman/chansrv/pulse/pulse-notes.txt
index 4a4b7273..e99b3ec5 100644
--- a/sesman/chansrv/pulse/pulse-notes.txt
+++ b/sesman/chansrv/pulse/pulse-notes.txt
@@ -25,3 +25,32 @@ autospawn = no
daemon-binary = /bin/true
xfreerdp -a 24 -z --plugin rdpsnd --data alsa:hw:0,0 -- 127.0.0.1
+
+
+to get ./configure on pulse source to run
+apt-get install libsndfile1-dev
+apt-get install libspeex-dev
+apt-get install libspeexdsp-dev
+
+alsamixer
+apt-get install alsa-utils
+
+/etc/asound.conf
+---------------------------------
+pcm.pulse {
+ type pulse
+}
+
+ctl.pulse {
+ type pulse
+}
+
+pcm.!default {
+ type pulse
+}
+
+ctl.!default {
+ type pulse
+}
+---------------------------------
+