neutrinolabs / pulseaudio-module-xrdp

xrdp sink / source pulseaudio modules
GNU Lesser General Public License v2.1
211 stars 40 forks source link

distorted sound #118

Closed Varun-garg closed 4 weeks ago

Varun-garg commented 4 weeks ago

I am not able to get this working on Arch. I am getting 100% distorted sound. when I login, I stop pulse in systemctl and then launch it from terminal launched inside xrdp session.

Logs

D: [pulseaudio] memblock.c: Using shared memfd memory pool with 1024 slots of size 64.0 KiB each, total size is 64.0 MiB, maximum usable slot size is 65472
D: [pulseaudio] srbchannel.c: SHM block is 65472 bytes, ringbuffer capacity is 2 * 32712 bytes
D: [pulseaudio] protocol-native.c: Enabling srbchannel...
D: [pulseaudio] module-augment-properties.c: Looking for .desktop file for gsd-media-keys
D: [pulseaudio] protocol-native.c: Client enabled srbchannel.
D: [xrdp-sink] module-xrdp-sink.c: sink_process_msg: PA_SINK_MESSAGE_GET_LATENCY
D: [xrdp-sink] module-xrdp-sink.c: sink_process_msg: lat 39887
D:
...
E: [xrdp-sink] module-xrdp-sink.c: sink_process_msg: not running
E: [xrdp-sink] module-xrdp-sink.c: close_send:
E: [xrdp-sink] module-xrdp-sink.c: Connected ok fd 25
E: [xrdp-sink] module-xrdp-sink.c: sink_process_msg: not running
E: [xrdp-sink] module-xrdp-sink.c: close_send:
..
D: [xrdp-sink] module-xrdp-sink.c: process_render: u->block_usec 30000
D: [xrdp-sink] module-xrdp-sink.c: process_render: u->block_usec 30000
D: [xrdp-sink] module-xrdp-sink.c: process_render: u->block_usec 30000
...
D: [xrdp-sink] module-xrdp-sink.c: sink_process_msg: lat 18191
D: [xrdp-sink] module-xrdp-sink.c: sink_process_msg: PA_SINK_MESSAGE_GET_LATENCY
D: [xrdp-sink] module-xrdp-sink.c: sink_process_msg: lat 17995
D: [xrdp-sink] module-xrdp-sink.c: sink_process_msg: PA_SINK_MESSAGE_GET_LATENCY
D: [xrdp-sink] module-xrdp-sink.c: sink_process_msg: lat 17795
D: [xrdp-sink] module-xrdp-sink.c: sink_process_msg: PA_SINK_MESSAGE_GET_LATENCY
D: [xrdp-sink] module-xrdp-sink.c: sink_process_msg: lat 17552
D: [xrdp-sink] module-xrdp-sink.c: sink_process_msg: PA_SINK_MESSAGE_GET_LATENCY
D: [xrdp-sink] module-xrdp-sink.c: sink_process_msg: lat 17344
D: [xrdp-sink] module-xrdp-sink.c: process_render: u->block_usec 30000
D: [xrdp-sink] module-xrdp-sink.c: bytes 1448
D: [xrdp-sink] module-xrdp-sink.c: data_send: sent header ok bytes 1448
D: [xrdp-sink] module-xrdp-sink.c: bytes 16384
D: [xrdp-sink] module-xrdp-sink.c: data_send: sent header ok bytes 16384
D: [xrdp-sink] module-xrdp-sink.c: bytes 1448
D: [xrdp-sink] module-xrdp-sink.c: data_send: sent header ok bytes 1448
D: [xrdp-sink] module-xrdp-sink.c: bytes 16384
D: [xrdp-sink] module-xrdp-sink.c: data_send: sent header ok bytes 16384
D: [xrdp-sink] module-xrdp-sink.c: sink_process_msg: PA_SINK_MESSAGE_GET_LATENCY
D: [xrdp-sink] module-xrdp-sink.c: sink_process_msg: lat 34114
D: [xrdp-sink] module-xrdp-sink.c: sink_process_msg: PA_SINK_MESSAGE_GET_LATENCY
D: [xrdp-sink] module-xrdp-sink.c: sink_process_msg: lat 33592
D: [xrdp-sink] module-xrdp-sink.c: sink_process_msg: PA_SINK_MESSAGE_GET_LATENCY
D: [xrdp-sink] module-xrdp-sink.c: sink_process_msg: lat 33135
D: [xrdp-sink] sink-input.c: Requesting rewind due to corking
D: [xrdp-sink] module-xrdp-sink.c: Requested to rewind 23040 bytes.
D: [xrdp-sink] sink.c: Processing rewind...
D: [xrdp-sink] sink-input.c: Have to rewind 23040 bytes on render memblockq.
D: [xrdp-sink] sink-input.c: Have to rewind 10584 bytes on implementor.
D: [xrdp-sink] sink-input.c: Integral period length is 147 input frames
D: [xrdp-sink] source.c: Processing rewind...
D: [xrdp-sink] module-xrdp-sink.c: Rewound 23040 bytes.
D: [xrdp-sink] module-xrdp-sink.c: sink_process_msg: PA_SINK_MESSAGE_SET_STATE
E: [xrdp-sink] module-xrdp-sink.c: sink_process_msg: not running
E: [xrdp-sink] module-xrdp-sink.c: close_send:
D: [xrdp-sink] module-xrdp-sink.c: close_send: sent header ok
D: [pulseaudio] sink.c: xrdp-sink: state: RUNNING -> IDLE
D: [xrdp-sink] module-xrdp-sink.c: sink_process_msg: PA_SINK_MESSAGE_GET_LATENCY
D: [xrdp-sink] module-xrdp-sink.c: sink_process_msg: lat 2448
D: [xrdp-sink] module-xrdp-sink.c: sink_process_msg: PA_SINK_MESSAGE_GET_LATENCY
D: [xrdp-sink] module-xrdp-sink.c: sink_process_msg: lat 2343
D: [xrdp-sink] module-xrdp-sink.c: sink_process_msg: PA_SINK_MESSAGE_GET_LATENCY
D: [xrdp-sink] module-xrdp-sink.c: sink_process_msg: lat 2125
D: [xrdp-sink] module-xrdp-sink.c: sink_process_msg: PA_SINK_MESSAGE_GET_LATENCY
D: [xrdp-sink] module-xrdp-sink.c: sink_process_msg: lat 1871
D: [xrdp-sink] module-xrdp-sink.c: sink_process_msg: PA_SINK_MESSAGE_GET_LATENCY
D: [xrdp-sink] module-xrdp-sink.c: sink_process_msg: lat 1728
D: [xrdp-sink] module-xrdp-sink.c: sink_process_msg: PA_SINK_MESSAGE_GET_LATENCY
Varun-garg commented 4 weeks ago

I got it working. This was an existing linux install that I was trying to also get on hyper-v. Apparently in my /etc/pulse/daemon.conf I had set default-sample-format to s32le which seems unsupported. Changing it to s16le fixed it.

Sharing below settings which seem to work well for me:

default-sample-format = s16le
default-sample-rate = 44100
default-fragments = 2
default-fragment-size-msec = 3