summaryrefslogtreecommitdiffstats
path: root/channels/rdpsnd/client
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 01:25:12 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 01:25:12 +0000
commit827a4c3faa27e0c186452585b15094eee1119085 (patch)
treee6a08b0c767863d66f7d4a9de80db5edc7db29be /channels/rdpsnd/client
parentReleasing progress-linux version 3.3.0+dfsg1-1~progress7.99u1. (diff)
downloadfreerdp3-827a4c3faa27e0c186452585b15094eee1119085.tar.xz
freerdp3-827a4c3faa27e0c186452585b15094eee1119085.zip
Merging upstream version 3.5.0+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'channels/rdpsnd/client')
-rw-r--r--channels/rdpsnd/client/alsa/rdpsnd_alsa.c16
-rw-r--r--channels/rdpsnd/client/oss/CMakeLists.txt6
-rw-r--r--channels/rdpsnd/client/oss/rdpsnd_oss.c24
-rw-r--r--channels/rdpsnd/client/pulse/rdpsnd_pulse.c2
4 files changed, 25 insertions, 23 deletions
diff --git a/channels/rdpsnd/client/alsa/rdpsnd_alsa.c b/channels/rdpsnd/client/alsa/rdpsnd_alsa.c
index 97f0ba0..9751bbe 100644
--- a/channels/rdpsnd/client/alsa/rdpsnd_alsa.c
+++ b/channels/rdpsnd/client/alsa/rdpsnd_alsa.c
@@ -57,14 +57,14 @@ typedef struct
snd_pcm_uframes_t period_size;
} rdpsndAlsaPlugin;
-#define SND_PCM_CHECK(_func, _status) \
- do \
- { \
- if (_status < 0) \
- { \
- WLog_ERR(TAG, "%s: %d\n", _func, _status); \
- return -1; \
- } \
+#define SND_PCM_CHECK(_func, _status) \
+ do \
+ { \
+ if ((_status) < 0) \
+ { \
+ WLog_ERR(TAG, "%s: %d\n", (_func), (_status)); \
+ return -1; \
+ } \
} while (0)
static int rdpsnd_alsa_set_hw_params(rdpsndAlsaPlugin* alsa)
diff --git a/channels/rdpsnd/client/oss/CMakeLists.txt b/channels/rdpsnd/client/oss/CMakeLists.txt
index 83bd59f..c495752 100644
--- a/channels/rdpsnd/client/oss/CMakeLists.txt
+++ b/channels/rdpsnd/client/oss/CMakeLists.txt
@@ -30,6 +30,12 @@ set(${MODULE_PREFIX}_LIBS
)
include_directories(..)
+include_directories(${CMAKE_CURRENT_BINARY_DIR})
include_directories(${OSS_INCLUDE_DIRS})
+configure_file(
+ ${CMAKE_SOURCE_DIR}/cmake/oss-includes.h.in
+ ${CMAKE_CURRENT_BINARY_DIR}/oss-includes.h
+ @ONLY
+)
add_channel_client_subsystem_library(${MODULE_PREFIX} ${MODULE_NAME} ${CHANNEL_NAME} "" TRUE "")
diff --git a/channels/rdpsnd/client/oss/rdpsnd_oss.c b/channels/rdpsnd/client/oss/rdpsnd_oss.c
index 54869ab..84105fd 100644
--- a/channels/rdpsnd/client/oss/rdpsnd_oss.c
+++ b/channels/rdpsnd/client/oss/rdpsnd_oss.c
@@ -37,11 +37,7 @@
#include <libgen.h>
#include <limits.h>
#include <unistd.h>
-#if defined(__OpenBSD__)
-#include <soundcard.h>
-#else
-#include <sys/soundcard.h>
-#endif
+#include <oss-includes.h>
#include <sys/ioctl.h>
#include <freerdp/types.h>
@@ -64,15 +60,15 @@ typedef struct
AUDIO_FORMAT format;
} rdpsndOssPlugin;
-#define OSS_LOG_ERR(_text, _error) \
- do \
- { \
- if (_error != 0) \
- { \
- char ebuffer[256] = { 0 }; \
- WLog_ERR(TAG, "%s: %i - %s", _text, _error, \
- winpr_strerror(_error, ebuffer, sizeof(ebuffer))); \
- } \
+#define OSS_LOG_ERR(_text, _error) \
+ do \
+ { \
+ if ((_error) != 0) \
+ { \
+ char ebuffer[256] = { 0 }; \
+ WLog_ERR(TAG, "%s: %i - %s", (_text), (_error), \
+ winpr_strerror((_error), ebuffer, sizeof(ebuffer))); \
+ } \
} while (0)
static int rdpsnd_oss_get_format(const AUDIO_FORMAT* format)
diff --git a/channels/rdpsnd/client/pulse/rdpsnd_pulse.c b/channels/rdpsnd/client/pulse/rdpsnd_pulse.c
index 59b2076..2b09680 100644
--- a/channels/rdpsnd/client/pulse/rdpsnd_pulse.c
+++ b/channels/rdpsnd/client/pulse/rdpsnd_pulse.c
@@ -752,7 +752,7 @@ FREERDP_ENTRY_POINT(UINT pulse_freerdp_rdpsnd_client_subsystem_entry(
if (pa_threaded_mainloop_start(pulse->mainloop) < 0)
{
pa_threaded_mainloop_unlock(pulse->mainloop);
- return FALSE;
+ goto error;
}
pa_threaded_mainloop_unlock(pulse->mainloop);