Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package FAudio for openSUSE:Factory checked in at 2022-01-11 21:20:02 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/FAudio (Old) and /work/SRC/openSUSE:Factory/.FAudio.new.1892 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "FAudio" Tue Jan 11 21:20:02 2022 rev:19 rq:945517 version:22.01 Changes: -------- --- /work/SRC/openSUSE:Factory/FAudio/FAudio.changes 2022-01-03 10:49:40.087586161 +0100 +++ /work/SRC/openSUSE:Factory/.FAudio.new.1892/FAudio.changes 2022-01-11 21:24:13.365167861 +0100 @@ -1,0 +2,6 @@ +Mon Jan 10 19:50:02 UTC 2022 - Aaron Stern <ukbeas...@protonmail.com> + +- update 22.01: + * Continued work on the experimental Wine/Win32 platform backend. + +------------------------------------------------------------------- Old: ---- FAudio-21.12.tar.gz New: ---- FAudio-22.01.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ FAudio.spec ++++++ --- /var/tmp/diff_new_pack.jXTzsk/_old 2022-01-11 21:24:14.141168407 +0100 +++ /var/tmp/diff_new_pack.jXTzsk/_new 2022-01-11 21:24:14.145168409 +0100 @@ -17,7 +17,7 @@ Name: FAudio -Version: 21.12 +Version: 22.01 Release: 0 Summary: A reimplementation of the XNA Game Studio libraries License: Zlib ++++++ FAudio-21.12.tar.gz -> FAudio-22.01.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/FAudio-21.12/CMakeLists.txt new/FAudio-22.01/CMakeLists.txt --- old/FAudio-21.12/CMakeLists.txt 2021-12-01 17:38:56.000000000 +0100 +++ new/FAudio-22.01/CMakeLists.txt 2022-01-01 17:40:59.000000000 +0100 @@ -29,8 +29,8 @@ # Version SET(LIB_MAJOR_VERSION "0") -SET(LIB_MINOR_VERSION "21") -SET(LIB_REVISION "12") +SET(LIB_MINOR_VERSION "22") +SET(LIB_REVISION "01") SET(LIB_VERSION "${LIB_MAJOR_VERSION}.${LIB_MINOR_VERSION}.${LIB_REVISION}") # Build Type diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/FAudio-21.12/csharp/FAudio.cs new/FAudio-22.01/csharp/FAudio.cs --- old/FAudio-21.12/csharp/FAudio.cs 2021-12-01 17:38:56.000000000 +0100 +++ new/FAudio-22.01/csharp/FAudio.cs 2022-01-01 17:40:59.000000000 +0100 @@ -78,8 +78,8 @@ public const uint FAUDIO_TARGET_VERSION = 8; public const uint FAUDIO_ABI_VERSION = 0; - public const uint FAUDIO_MAJOR_VERSION = 21; - public const uint FAUDIO_MINOR_VERSION = 12; + public const uint FAUDIO_MAJOR_VERSION = 22; + public const uint FAUDIO_MINOR_VERSION = 1; public const uint FAUDIO_PATCH_VERSION = 0; public const uint FAUDIO_COMPILED_VERSION = ( diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/FAudio-21.12/include/FAudio.h new/FAudio-22.01/include/FAudio.h --- old/FAudio-21.12/include/FAudio.h 2021-12-01 17:38:56.000000000 +0100 +++ new/FAudio-22.01/include/FAudio.h 2022-01-01 17:40:59.000000000 +0100 @@ -484,8 +484,8 @@ #define FAUDIO_TARGET_VERSION 8 /* Targeting compatibility with XAudio 2.8 */ #define FAUDIO_ABI_VERSION 0 -#define FAUDIO_MAJOR_VERSION 21 -#define FAUDIO_MINOR_VERSION 12 +#define FAUDIO_MAJOR_VERSION 22 +#define FAUDIO_MINOR_VERSION 1 #define FAUDIO_PATCH_VERSION 0 #define FAUDIO_COMPILED_VERSION ( \ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/FAudio-21.12/src/FAudio_platform_win32.c new/FAudio-22.01/src/FAudio_platform_win32.c --- old/FAudio-21.12/src/FAudio_platform_win32.c 2021-12-01 17:38:56.000000000 +0100 +++ new/FAudio-22.01/src/FAudio_platform_win32.c 2022-01-01 17:40:59.000000000 +0100 @@ -70,6 +70,44 @@ OutputDebugStringA(msg); } +static HMODULE kernelbase = NULL; +static HRESULT (WINAPI *my_SetThreadDescription)(HANDLE, PCWSTR) = NULL; + +static void FAudio_resolve_SetThreadDescription(void) +{ + kernelbase = LoadLibraryA("kernelbase.dll"); + if (!kernelbase) + return; + + my_SetThreadDescription = (HRESULT (WINAPI *)(HANDLE, PCWSTR)) GetProcAddress(kernelbase, "SetThreadDescription"); + if (!my_SetThreadDescription) + { + FreeLibrary(kernelbase); + kernelbase = NULL; + } +} + +static void FAudio_set_thread_name(char const *name) +{ + int ret; + WCHAR *nameW; + + if (!my_SetThreadDescription) + return; + + ret = MultiByteToWideChar(CP_UTF8, 0, name, -1, NULL, 0); + + nameW = FAudio_malloc(ret * sizeof(WCHAR)); + if (!nameW) + return; + + ret = MultiByteToWideChar(CP_UTF8, 0, name, -1, nameW, ret); + if (ret) + my_SetThreadDescription(GetCurrentThread(), nameW); + + FAudio_free(nameW); +} + static HRESULT FAudio_FillAudioClientBuffer( struct FAudioAudioClientThreadArgs *args, IAudioRenderClient *client, @@ -121,6 +159,8 @@ HRESULT hr = S_OK; UINT frames, padding = 0; + FAudio_set_thread_name(__func__); + hr = IAudioClient_GetService( args->client, &IID_IAudioRenderClient, @@ -172,6 +212,7 @@ BOOL has_sse2 = IsProcessorFeaturePresent(PF_XMMI64_INSTRUCTIONS_AVAILABLE); FAudio_INTERNAL_InitSIMDFunctions(has_sse2, FALSE); + FAudio_resolve_SetThreadDescription(); FAudio_PlatformAddRef(); @@ -305,6 +346,12 @@ SetEvent(data->stopEvent); WaitForSingleObject(data->audioThread, INFINITE); if (data->client) IAudioClient_Release(data->client); + if (kernelbase) + { + my_SetThreadDescription = NULL; + FreeLibrary(kernelbase); + kernelbase = NULL; + } FAudio_PlatformRelease(); } @@ -364,13 +411,14 @@ uint32_t index, FAudioDeviceDetails *details ) { + WAVEFORMATEX *format, *obtained; WAVEFORMATEXTENSIBLE *ext; - WAVEFORMATEX *format; IAudioClient *client; IMMDevice *device; uint32_t ret = 0; HRESULT hr; WCHAR *str; + GUID sub; FAudio_memset(details, 0, sizeof(FAudioDeviceDetails)); if (index > 0) return FAUDIO_E_INVALID_CALL; @@ -406,6 +454,28 @@ hr = IAudioClient_GetMixFormat(client, &format); FAudio_assert(!FAILED(hr) && "Failed to get audio client mix format!"); + if (format->wFormatTag == WAVE_FORMAT_EXTENSIBLE) + { + ext = (WAVEFORMATEXTENSIBLE *)format; + sub = ext->SubFormat; + FAudio_memcpy( + &ext->SubFormat, + &DATAFORMAT_SUBTYPE_PCM, + sizeof(GUID) + ); + + hr = IAudioClient_IsFormatSupported(client, AUDCLNT_SHAREMODE_SHARED, format, &obtained); + if (FAILED(hr)) + { + ext->SubFormat = sub; + } + else if (obtained) + { + CoTaskMemFree(format); + format = obtained; + } + } + details->OutputFormat.Format.wFormatTag = format->wFormatTag; details->OutputFormat.Format.nChannels = format->nChannels; details->OutputFormat.Format.nSamplesPerSec = format->nSamplesPerSec; @@ -426,6 +496,8 @@ ); } + CoTaskMemFree(format); + IAudioClient_Release(client); IMMDevice_Release(device); @@ -475,6 +547,7 @@ struct FAudioThreadArgs *args = user; DWORD ret; + FAudio_set_thread_name(args->name); ret = args->func(args->data); FAudio_free(args);