Compare commits
11 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| ce6076091b | |||
| dba8166b67 | |||
| 4fa9c8e4b4 | |||
| 912c0cc9eb | |||
| 9a67aa8530 | |||
| 45e757ea12 | |||
| 026f96c2a3 | |||
| 631624fa58 | |||
| 51e11fdb9c | |||
| eaf3b94143 | |||
| 84eca96dad |
+9
-1
@@ -63,6 +63,7 @@ static const ALCchar jackDevice[] = "JACK Default";
|
||||
static void *jack_handle;
|
||||
#define MAKE_FUNC(f) static __typeof(f) * p##f
|
||||
JACK_FUNCS(MAKE_FUNC);
|
||||
static __typeof(jack_error_callback) * pjack_error_callback;
|
||||
#undef MAKE_FUNC
|
||||
|
||||
#define jack_client_open pjack_client_open
|
||||
@@ -84,6 +85,7 @@ JACK_FUNCS(MAKE_FUNC);
|
||||
#define jack_set_buffer_size_callback pjack_set_buffer_size_callback
|
||||
#define jack_set_buffer_size pjack_set_buffer_size
|
||||
#define jack_get_buffer_size pjack_get_buffer_size
|
||||
#define jack_error_callback (*pjack_error_callback)
|
||||
#endif
|
||||
|
||||
|
||||
@@ -120,6 +122,10 @@ static ALCboolean jack_load(void)
|
||||
} while(0)
|
||||
JACK_FUNCS(LOAD_FUNC);
|
||||
#undef LOAD_FUNC
|
||||
/* Optional symbols. These don't exist in all versions of JACK. */
|
||||
#define LOAD_SYM(f) p##f = GetSymbol(jack_handle, #f)
|
||||
LOAD_SYM(jack_error_callback);
|
||||
#undef LOAD_SYM
|
||||
|
||||
if(error)
|
||||
{
|
||||
@@ -556,6 +562,7 @@ typedef struct ALCjackBackendFactory {
|
||||
|
||||
static ALCboolean ALCjackBackendFactory_init(ALCjackBackendFactory* UNUSED(self))
|
||||
{
|
||||
void (*old_error_cb)(const char*);
|
||||
jack_client_t *client;
|
||||
jack_status_t status;
|
||||
|
||||
@@ -565,9 +572,10 @@ static ALCboolean ALCjackBackendFactory_init(ALCjackBackendFactory* UNUSED(self)
|
||||
if(!GetConfigValueBool(NULL, "jack", "spawn-server", 0))
|
||||
ClientOptions |= JackNoStartServer;
|
||||
|
||||
old_error_cb = (&jack_error_callback ? jack_error_callback : NULL);
|
||||
jack_set_error_function(jack_msg_handler);
|
||||
client = jack_client_open("alsoft", ClientOptions, &status, NULL);
|
||||
jack_set_error_function(NULL);
|
||||
jack_set_error_function(old_error_cb);
|
||||
if(client == NULL)
|
||||
{
|
||||
WARN("jack_client_open() failed, 0x%02x\n", status);
|
||||
|
||||
@@ -41,6 +41,7 @@
|
||||
#endif
|
||||
|
||||
#ifdef __FreeBSD__
|
||||
#include <sys/types.h>
|
||||
#include <sys/sysctl.h>
|
||||
#endif
|
||||
|
||||
@@ -295,6 +296,13 @@ void SetMixerFPUMode(FPUCtl *ctl)
|
||||
{
|
||||
#ifdef HAVE_FENV_H
|
||||
fegetenv(STATIC_CAST(fenv_t, ctl));
|
||||
#ifdef _WIN32
|
||||
/* HACK: A nasty bug in MinGW-W64 causes fegetenv and fesetenv to not save
|
||||
* and restore the FPU rounding mode, so we have to do it manually. Don't
|
||||
* know if this also applies to MSVC.
|
||||
*/
|
||||
ctl->round_mode = fegetround();
|
||||
#endif
|
||||
#if defined(__GNUC__) && defined(HAVE_SSE)
|
||||
/* FIXME: Some fegetenv implementations can get the SSE environment too?
|
||||
* How to tell when it does? */
|
||||
@@ -341,6 +349,9 @@ void RestoreFPUMode(const FPUCtl *ctl)
|
||||
{
|
||||
#ifdef HAVE_FENV_H
|
||||
fesetenv(STATIC_CAST(fenv_t, ctl));
|
||||
#ifdef _WIN32
|
||||
fesetround(ctl->round_mode);
|
||||
#endif
|
||||
#if defined(__GNUC__) && defined(HAVE_SSE)
|
||||
if((CPUCapFlags&CPU_CAP_SSE))
|
||||
__asm__ __volatile__("ldmxcsr %0" : : "m" (*&ctl->sse_state));
|
||||
|
||||
+38
-17
@@ -100,7 +100,7 @@ ENDIF()
|
||||
|
||||
SET(LIB_MAJOR_VERSION "1")
|
||||
SET(LIB_MINOR_VERSION "18")
|
||||
SET(LIB_REVISION "1")
|
||||
SET(LIB_REVISION "2")
|
||||
SET(LIB_VERSION "${LIB_MAJOR_VERSION}.${LIB_MINOR_VERSION}.${LIB_REVISION}")
|
||||
|
||||
SET(EXPORT_DECL "")
|
||||
@@ -419,27 +419,26 @@ SET(SSE2_SWITCH "")
|
||||
SET(SSE3_SWITCH "")
|
||||
SET(SSE4_1_SWITCH "")
|
||||
SET(FPU_NEON_SWITCH "")
|
||||
IF(NOT MSVC)
|
||||
CHECK_C_COMPILER_FLAG(-msse HAVE_MSSE_SWITCH)
|
||||
IF(HAVE_MSSE_SWITCH)
|
||||
|
||||
CHECK_C_COMPILER_FLAG(-msse HAVE_MSSE_SWITCH)
|
||||
IF(HAVE_MSSE_SWITCH)
|
||||
SET(SSE_SWITCH "-msse")
|
||||
ENDIF()
|
||||
CHECK_C_COMPILER_FLAG(-msse2 HAVE_MSSE2_SWITCH)
|
||||
IF(HAVE_MSSE2_SWITCH)
|
||||
ENDIF()
|
||||
CHECK_C_COMPILER_FLAG(-msse2 HAVE_MSSE2_SWITCH)
|
||||
IF(HAVE_MSSE2_SWITCH)
|
||||
SET(SSE2_SWITCH "-msse2")
|
||||
ENDIF()
|
||||
CHECK_C_COMPILER_FLAG(-msse3 HAVE_MSSE3_SWITCH)
|
||||
IF(HAVE_MSSE3_SWITCH)
|
||||
ENDIF()
|
||||
CHECK_C_COMPILER_FLAG(-msse3 HAVE_MSSE3_SWITCH)
|
||||
IF(HAVE_MSSE3_SWITCH)
|
||||
SET(SSE3_SWITCH "-msse3")
|
||||
ENDIF()
|
||||
CHECK_C_COMPILER_FLAG(-msse4.1 HAVE_MSSE4_1_SWITCH)
|
||||
IF(HAVE_MSSE4_1_SWITCH)
|
||||
ENDIF()
|
||||
CHECK_C_COMPILER_FLAG(-msse4.1 HAVE_MSSE4_1_SWITCH)
|
||||
IF(HAVE_MSSE4_1_SWITCH)
|
||||
SET(SSE4_1_SWITCH "-msse4.1")
|
||||
ENDIF()
|
||||
CHECK_C_COMPILER_FLAG(-mfpu=neon HAVE_MFPU_NEON_SWITCH)
|
||||
IF(HAVE_MFPU_NEON_SWITCH)
|
||||
ENDIF()
|
||||
CHECK_C_COMPILER_FLAG(-mfpu=neon HAVE_MFPU_NEON_SWITCH)
|
||||
IF(HAVE_MFPU_NEON_SWITCH)
|
||||
SET(FPU_NEON_SWITCH "-mfpu=neon")
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
|
||||
CHECK_C_SOURCE_COMPILES("int foo(const char *str, ...) __attribute__((format(printf, 1, 2)));
|
||||
@@ -624,6 +623,16 @@ int main()
|
||||
}"
|
||||
PTHREAD_SETNAME_NP_ONE_PARAM
|
||||
)
|
||||
CHECK_C_SOURCE_COMPILES("
|
||||
#include <pthread.h>
|
||||
#include <pthread_np.h>
|
||||
int main()
|
||||
{
|
||||
pthread_setname_np(pthread_self(), \"%s\", \"testname\");
|
||||
return 0;
|
||||
}"
|
||||
PTHREAD_SETNAME_NP_THREE_PARAMS
|
||||
)
|
||||
ENDIF()
|
||||
CHECK_SYMBOL_EXISTS(pthread_mutexattr_setkind_np "pthread.h;pthread_np.h" HAVE_PTHREAD_MUTEXATTR_SETKIND_NP)
|
||||
ELSE()
|
||||
@@ -640,6 +649,15 @@ int main()
|
||||
}"
|
||||
PTHREAD_SETNAME_NP_ONE_PARAM
|
||||
)
|
||||
CHECK_C_SOURCE_COMPILES("
|
||||
#include <pthread.h>
|
||||
int main()
|
||||
{
|
||||
pthread_setname_np(pthread_self(), \"%s\", \"testname\");
|
||||
return 0;
|
||||
}"
|
||||
PTHREAD_SETNAME_NP_THREE_PARAMS
|
||||
)
|
||||
ENDIF()
|
||||
CHECK_SYMBOL_EXISTS(pthread_mutexattr_setkind_np pthread.h HAVE_PTHREAD_MUTEXATTR_SETKIND_NP)
|
||||
ENDIF()
|
||||
@@ -885,6 +903,9 @@ IF(OSS_FOUND)
|
||||
SET(HAVE_OSS 1)
|
||||
SET(BACKENDS "${BACKENDS} OSS,")
|
||||
SET(ALC_OBJS ${ALC_OBJS} Alc/backends/oss.c)
|
||||
IF(OSS_LIBRARIES)
|
||||
SET(EXTRA_LIBS ${OSS_LIBRARIES} ${EXTRA_LIBS})
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
IF(ALSOFT_REQUIRE_OSS AND NOT HAVE_OSS)
|
||||
|
||||
@@ -1,3 +1,18 @@
|
||||
openal-soft-1.18.2:
|
||||
|
||||
Fixed resetting the FPU rounding mode after certain function calls on
|
||||
Windows.
|
||||
|
||||
Fixed use of SSE intrinsics when building with Clang on Windows.
|
||||
|
||||
Fixed a crash with the JACK backend when using JACK1.
|
||||
|
||||
Fixed use of pthread_setnane_np on NetBSD.
|
||||
|
||||
Fixed building on FreeBSD with an older freebsd-lib.
|
||||
|
||||
OSS now links with libossaudio if found at build time (for NetBSD).
|
||||
|
||||
openal-soft-1.18.1:
|
||||
|
||||
Fixed an issue where resuming a source might not restart playing it.
|
||||
|
||||
@@ -898,6 +898,9 @@ void ALCcontext_ProcessUpdates(ALCcontext *context);
|
||||
typedef struct {
|
||||
#ifdef HAVE_FENV_H
|
||||
DERIVE_FROM_TYPE(fenv_t);
|
||||
#ifdef _WIN32
|
||||
int round_mode;
|
||||
#endif
|
||||
#else
|
||||
int state;
|
||||
#endif
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
version: 1.18.1.{build}
|
||||
version: 1.18.2.{build}
|
||||
|
||||
environment:
|
||||
matrix:
|
||||
|
||||
+13
-1
@@ -2,8 +2,10 @@
|
||||
#
|
||||
# OSS_FOUND - True if OSS_INCLUDE_DIR is found
|
||||
# OSS_INCLUDE_DIRS - Set when OSS_INCLUDE_DIR is found
|
||||
# OSS_LIBRARIES - Set when OSS_LIBRARY is found
|
||||
#
|
||||
# OSS_INCLUDE_DIR - where to find sys/soundcard.h, etc.
|
||||
# OSS_LIBRARY - where to find libossaudio (optional).
|
||||
#
|
||||
|
||||
find_path(OSS_INCLUDE_DIR
|
||||
@@ -11,11 +13,21 @@ find_path(OSS_INCLUDE_DIR
|
||||
DOC "The OSS include directory"
|
||||
)
|
||||
|
||||
find_library(OSS_LIBRARY
|
||||
NAMES ossaudio
|
||||
DOC "Optional OSS library"
|
||||
)
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(OSS REQUIRED_VARS OSS_INCLUDE_DIR)
|
||||
|
||||
if(OSS_FOUND)
|
||||
set(OSS_INCLUDE_DIRS ${OSS_INCLUDE_DIR})
|
||||
if(OSS_LIBRARY)
|
||||
set(OSS_LIBRARIES ${OSS_LIBRARY})
|
||||
else()
|
||||
unset(OSS_LIBRARIES)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
mark_as_advanced(OSS_INCLUDE_DIR)
|
||||
mark_as_advanced(OSS_INCLUDE_DIR OSS_LIBRARY)
|
||||
|
||||
@@ -500,6 +500,8 @@ void althrd_setname(althrd_t thr, const char *name)
|
||||
#if defined(PTHREAD_SETNAME_NP_ONE_PARAM)
|
||||
if(althrd_equal(thr, althrd_current()))
|
||||
pthread_setname_np(name);
|
||||
#elif defined(PTHREAD_SETNAME_NP_THREE_PARAMS)
|
||||
pthread_setname_np(thr, "%s", (void*)name);
|
||||
#else
|
||||
pthread_setname_np(thr, name);
|
||||
#endif
|
||||
|
||||
@@ -194,6 +194,9 @@
|
||||
/* Define if pthread_setname_np() only accepts one parameter */
|
||||
#cmakedefine PTHREAD_SETNAME_NP_ONE_PARAM
|
||||
|
||||
/* Define if pthread_setname_np() accepts three parameters */
|
||||
#cmakedefine PTHREAD_SETNAME_NP_THREE_PARAMS
|
||||
|
||||
/* Define if we have pthread_set_name_np() */
|
||||
#cmakedefine HAVE_PTHREAD_SET_NAME_NP
|
||||
|
||||
|
||||
Reference in New Issue
Block a user