Commit Graph

80 Commits

Author SHA1 Message Date
matt335672
675dd77807 Parameterise the sockdir with the UID of the user
The top level socket directory is now called XRDP_SOCKET_ROOT_PATH.
Below that are user-specific directories referred to with the
XRDP_SOCKET_PATH macro - this name is hard-coded into xorgxrdp and
the audio modules as an environment variable.

XRDP_SOCKET_PATH now looks like $XRDP_SOCKET_ROOT_PATH/<uid>

XRDP_SOCKET_PATH is only writeable by the user, and readable by the user
and the xrdp process.
2023-10-23 18:14:46 +01:00
matt335672
7cf9101407 Fix compile errors detected by the older gcc 4.8.5 compiler:-
sesexec.c: In function ‘main’:
sesexec.c:521:1: error: control reaches end of non-void function [-Werror=return-type]

sound.c: In function ‘process_pcm_message’:
sound.c:1123:21: error: ‘for’ loop initial declarations are only allowed in C99 mode
                     for (int i = 0; i < send_silence_times; i++)
                     ^
sound.c:1123:21: note: use option -std=c99 or -std=gnu99 to compile your code

These fixes are in line with our coding standard and have no functional change.
2023-06-07 20:21:54 +01:00
matt335672
05d1733950 Change chansrv to use common fifo code 2023-05-22 14:43:22 +01:00
Hiero32
9fe9ae3bc0 Support to set parameters from sesman.ini. 2023-03-28 21:20:54 +09:00
metalefty
f3dc94448c
Merge pull request #2537 from metalefty/sound-log
sound: logging improvements
2023-02-13 10:38:31 +09:00
Hiero32
1ffe7890d8
sound: fix noise between two playbacks for mp3/aac (#2519)
* sound: fix noise between two playbacks for mp3/aac
* fix sound stuttered on skip operation of vlc
2023-02-09 10:09:04 +09:00
Koichiro IWAO
73a8865561 chansrv/audin,sound: record index of formats array
It helps to know which audio format is in use.
2023-02-09 01:21:45 +09:00
Koichiro IWAO
264ee4a761 chansrv/sound: adjust log level and record wFormatTag as string
These log levels are unintendedly decreased during logging reworking.

Recording audio formats are useful to know which format is used in
current RDP session.
2023-02-09 01:06:44 +09:00
Khem Raj
d4e9b0f637 correct the location of errno.h
Fixes build on musl

Signed-off-by: Khem Raj <raj.khem@gmail.com>
2020-12-22 23:11:50 -08:00
Alexandre Quesnel
0c61a15fc5 Migrating logging to LOG() and LOG_DEVEL() in sesman/* 2020-11-30 00:36:20 +00:00
Alexandre Quesnel
a9ec1ebd99 Unifying logging in chanserv
This commit adds:
* replace multiple logging macros with LOG and LOG_DEVEL
* logging configuration for chanserv
* logging configuration for console output
* logging configuration for per file or method log level filtering for
debug builds
* file, line, and method name in log message for debug builds
2020-10-19 05:10:47 +00:00
Jay Sorg
d7b1f12d9b default rdpsnd audin off, can enable with --enable-rdpsndaudin 2019-10-22 22:48:15 -07:00
Jay Sorg
417bb71abf chansrv: env var to disable rdpsnd record 2019-07-08 22:45:58 -07:00
Jay Sorg
8aedd31762 chansrv: use rdpsnd record if supported, else try AUDIO_INPUT(MS-RDPEAI) 2019-07-08 22:03:27 -07:00
Jay Sorg
c5798df0bd chansrv: hook up audin 2019-07-08 18:25:59 -07:00
Jay Sorg
e14ea4ff2e chansrv: drop g_sent_flag, not very useful and some clients skip acks 2019-06-23 20:52:55 -07:00
Jay Sorg
4ad9e48ff5 chansrv: don't let audio fall behind 2019-06-22 23:01:13 -07:00
Koichiro IWAO
88f0d3114d
Fix build with FDK AAC v2
Original fix provided by takefu. See also:
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=233556
2018-11-28 01:31:14 +09:00
Koichiro IWAO
3d29b6ec76 sound: g_bbuf_size should be determined after codec is determined
Fixes #910, if both client and server support more than one codecs,
g_bbuf_size might be set to wrong value.
2017-11-08 08:57:52 +09:00
Jay Sorg
d9b929c185 chansrv: sound, fdk-aac, avoid 1 item array items 2017-08-04 17:24:57 -07:00
Jay Sorg
4f91a52109 chansrv: sound, remove a do not know and a comment 2017-08-04 17:24:57 -07:00
Jay Sorg
021a78f4c6 chansrv: sound, use WAVE_FORMAT_AAC not WAVE_FORMAT_AAC_MS 2017-08-04 17:24:57 -07:00
Jay Sorg
bf0d56c314 chansrv: sound, add aac 2017-08-04 17:24:57 -07:00
Jay Sorg
8ac35d7ed1 chansrv: sound, handle skips in audio acks 2017-08-04 17:24:57 -07:00
Koichiro IWAO
e990dd4263 chansrv: remove trailing space 2017-07-25 11:40:04 +09:00
Koichiro IWAO
ca24572fd5 chansrv: use switch-case to support more codecs 2017-07-25 11:40:04 +09:00
Koichiro IWAO
dbaf23e93b chansrv: constify wFormatTag 2017-07-25 11:40:04 +09:00
Pavel Roskin
148afd1170 Rename file_loc.h to xrdp_sockets.h, install it
Include xrdp_sockets.h directly, not through headers.
2017-03-28 00:59:16 -07:00
Pavel Roskin
6ed4c969f4 Eliminate APP_CC and DEFAULT_CC 2017-03-14 00:21:48 -07:00
Pavel Roskin
b2d3dcf169 Include config_ac.h from all source files 2017-03-04 00:52:34 -08:00
Pavel Roskin
6664aac00f Use "void" for empty argument list in declarations
In C, an empty argument list in a declaration means that the function
can accept any arguments. Use "void" instead, it means "no arguments".

C++ treats void and empty list as "no arguments".
2017-01-05 17:27:20 -08:00
Jay Sorg
9ccbfb6985 chansrv: added mp3 compression from Speidy 2016-07-13 17:44:07 -07:00
Pavel Roskin
0629b25d5f Fix warnings about unused variables and functions 2016-04-21 22:27:27 -07:00
Pavel Roskin
92a6833e9b Fix typos 2016-02-13 20:41:07 -08:00
Jay Sorg
4dd78c1b8e minor change in opus encoding 2015-01-27 16:32:38 -08:00
Jay Sorg
9c5c0660b2 chansrv: reset opus support on init 2015-01-10 00:50:46 -08:00
Jay Sorg
2f5b84b712 chansrv: added opus audio compression for playback 2015-01-09 23:31:28 -08:00
Jay Sorg
bff2009147 chansrv: change to 44100 recording, disconnect / reconnect fixes 2014-11-26 16:48:37 -08:00
speidy
c159505980 chansrv: fix for segfault issue in chansrv_common 2014-11-21 03:13:14 +02:00
Jay Sorg
f41a11d2c4 chansrv: some recording fixes 2014-11-02 22:47:51 -08:00
Laxmikant Rashinkar
a3e017cd58 restart listener when corresponding sound source/sink connections are closed 2014-10-18 11:22:24 -07:00
Laxmikant Rashinkar
122d8bc057 sound redirection: handle fragmented packets 2014-10-12 17:47:35 -07:00
Laxmikant Rashinkar
c0839cd6a5 when closing audio source, don't flush audio data if audio buffer is empty 2014-10-06 19:43:52 -07:00
Jay Sorg
8397055e8b move some hard code paths to defines in header 2014-08-06 13:21:01 -07:00
Jay Sorg
2e17b70fcd chansrv: sound_send_wave_data changes 2014-08-06 12:10:27 -07:00
Laxmikant Rashinkar
5e537ebdfe coverity: explicit null dereferenced 2014-07-27 12:57:13 -07:00
Laxmikant Rashinkar
73578bc612 coverity: fixed unchecked return value 2014-07-19 13:06:25 -07:00
Laxmikant Rashinkar
3bb31876e7 coverity: fixed resolution leak issues 2014-07-19 11:56:00 -07:00
Jay Sorg
6d3af904d3 sesman: sound.c: no logic change, remove tabs and warning 2014-06-28 09:54:36 -07:00
speidy
cbc8317c6d chansrv: sound: prevent an infinite loop when the connection with pulse audio is closed improperly 2014-06-26 23:02:44 +03:00