diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-04 01:25:12 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-04 01:25:12 +0000 |
commit | 827a4c3faa27e0c186452585b15094eee1119085 (patch) | |
tree | e6a08b0c767863d66f7d4a9de80db5edc7db29be /channels/audin | |
parent | Releasing progress-linux version 3.3.0+dfsg1-1~progress7.99u1. (diff) | |
download | freerdp3-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/audin')
-rw-r--r-- | channels/audin/client/alsa/audin_alsa.c | 2 | ||||
-rw-r--r-- | channels/audin/client/oss/CMakeLists.txt | 7 | ||||
-rw-r--r-- | channels/audin/client/oss/audin_oss.c | 27 |
3 files changed, 19 insertions, 17 deletions
diff --git a/channels/audin/client/alsa/audin_alsa.c b/channels/audin/client/alsa/audin_alsa.c index be3e52a..b1edb82 100644 --- a/channels/audin/client/alsa/audin_alsa.c +++ b/channels/audin/client/alsa/audin_alsa.c @@ -55,7 +55,7 @@ typedef struct rdpContext* rdpcontext; wLog* log; - int bytes_per_frame; + size_t bytes_per_frame; } AudinALSADevice; static snd_pcm_format_t audin_alsa_format(UINT32 wFormatTag, UINT32 bitPerChannel) diff --git a/channels/audin/client/oss/CMakeLists.txt b/channels/audin/client/oss/CMakeLists.txt index 6b747e4..5b4dac9 100644 --- a/channels/audin/client/oss/CMakeLists.txt +++ b/channels/audin/client/oss/CMakeLists.txt @@ -30,7 +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/audin/client/oss/audin_oss.c b/channels/audin/client/oss/audin_oss.c index 979a800..c42c089 100644 --- a/channels/audin/client/oss/audin_oss.c +++ b/channels/audin/client/oss/audin_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/freerdp.h> @@ -67,15 +63,15 @@ typedef struct rdpContext* rdpcontext; } AudinOSSDevice; -#define OSS_LOG_ERR(_text, _error) \ - do \ - { \ - if (_error != 0) \ - { \ - char buffer[256] = { 0 }; \ - WLog_ERR(TAG, "%s: %i - %s\n", _text, _error, \ - winpr_strerror(_error, buffer, sizeof(buffer))); \ - } \ +#define OSS_LOG_ERR(_text, _error) \ + do \ + { \ + if ((_error) != 0) \ + { \ + char buffer[256] = { 0 }; \ + WLog_ERR(TAG, "%s: %i - %s\n", (_text), (_error), \ + winpr_strerror((_error), buffer, sizeof(buffer))); \ + } \ } while (0) static UINT32 audin_oss_get_format(const AUDIO_FORMAT* format) @@ -233,7 +229,8 @@ static DWORD WINAPI audin_oss_thread_func(LPVOID arg) if (ioctl(pcm_handle, SNDCTL_DSP_SETFRAGMENT, &tmp) == -1) OSS_LOG_ERR("SNDCTL_DSP_SETFRAGMENT failed", errno); - buffer_size = (oss->FramesPerPacket * oss->format.nChannels * (oss->format.wBitsPerSample / 8)); + buffer_size = + (1ull * oss->FramesPerPacket * oss->format.nChannels * (oss->format.wBitsPerSample / 8ull)); buffer = (BYTE*)calloc((buffer_size + sizeof(void*)), sizeof(BYTE)); if (NULL == buffer) |