mirror of
https://gitlab.winehq.org/wine/wine.git
synced 2024-11-19 17:06:04 -07:00
faudio: Import upstream release 24.10.
This commit is contained in:
parent
7ce580d1fa
commit
5d2b3bb756
3 changed files with 30 additions and 9 deletions
|
@ -494,7 +494,7 @@ extern FAudioGUID DATAFORMAT_SUBTYPE_IEEE_FLOAT;
|
|||
|
||||
#define FAUDIO_ABI_VERSION 0
|
||||
#define FAUDIO_MAJOR_VERSION 24
|
||||
#define FAUDIO_MINOR_VERSION 6
|
||||
#define FAUDIO_MINOR_VERSION 10
|
||||
#define FAUDIO_PATCH_VERSION 0
|
||||
|
||||
#define FAUDIO_COMPILED_VERSION ( \
|
||||
|
|
|
@ -28,6 +28,7 @@
|
|||
#include "FAPOBase.h"
|
||||
#include <stdarg.h>
|
||||
|
||||
|
||||
#ifdef FAUDIO_WIN32_PLATFORM
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
@ -40,6 +41,9 @@
|
|||
#define WIN32_LEAN_AND_MEAN
|
||||
#include <windows.h>
|
||||
|
||||
#define NO_MEMCPY_OVERRIDE
|
||||
#define NO_MEMSET_OVERRIDE
|
||||
|
||||
#define FAudio_malloc malloc
|
||||
#define FAudio_realloc realloc
|
||||
#define FAudio_free free
|
||||
|
@ -110,16 +114,40 @@ extern void FAudio_Log(char const *msg);
|
|||
((x << 24) & 0x00FF000000000000) | \
|
||||
((x << 32) & 0xFF00000000000000)
|
||||
#else
|
||||
|
||||
#ifdef FAUDIO_SDL3_PLATFORM
|
||||
#include <SDL3/SDL_stdinc.h>
|
||||
#include <SDL3/SDL_assert.h>
|
||||
#include <SDL3/SDL_endian.h>
|
||||
#include <SDL3/SDL_log.h>
|
||||
|
||||
#define FAudio_swap16LE(x) SDL_Swap16LE(x)
|
||||
#define FAudio_swap16BE(x) SDL_Swap16BE(x)
|
||||
#define FAudio_swap32LE(x) SDL_Swap32LE(x)
|
||||
#define FAudio_swap32BE(x) SDL_Swap32BE(x)
|
||||
#define FAudio_swap64LE(x) SDL_Swap64LE(x)
|
||||
#define FAudio_swap64BE(x) SDL_Swap64BE(x)
|
||||
|
||||
#else
|
||||
#include <SDL_stdinc.h>
|
||||
#include <SDL_assert.h>
|
||||
#include <SDL_endian.h>
|
||||
#include <SDL_log.h>
|
||||
|
||||
#define FAudio_swap16LE(x) SDL_SwapLE16(x)
|
||||
#define FAudio_swap16BE(x) SDL_SwapBE16(x)
|
||||
#define FAudio_swap32LE(x) SDL_SwapLE32(x)
|
||||
#define FAudio_swap32BE(x) SDL_SwapBE32(x)
|
||||
#define FAudio_swap64LE(x) SDL_SwapLE64(x)
|
||||
#define FAudio_swap64BE(x) SDL_SwapBE64(x)
|
||||
#endif
|
||||
|
||||
/* SDL3 allows memcpy/memset for compiler optimization reasons */
|
||||
#ifndef SDL_SLOW_MEMCPY
|
||||
#define NO_MEMCPY_OVERRIDE
|
||||
#endif
|
||||
#ifndef SDL_SLOW_MEMSET
|
||||
#define NO_MEMSET_OVERRIDE
|
||||
#endif
|
||||
|
||||
#define FAudio_malloc SDL_malloc
|
||||
|
@ -180,13 +208,6 @@ extern void FAudio_Log(char const *msg);
|
|||
#define FAudio_getenv SDL_getenv
|
||||
#define FAudio_PRIu64 SDL_PRIu64
|
||||
#define FAudio_PRIx64 SDL_PRIx64
|
||||
|
||||
#define FAudio_swap16LE(x) SDL_SwapLE16(x)
|
||||
#define FAudio_swap16BE(x) SDL_SwapBE16(x)
|
||||
#define FAudio_swap32LE(x) SDL_SwapLE32(x)
|
||||
#define FAudio_swap32BE(x) SDL_SwapBE32(x)
|
||||
#define FAudio_swap64LE(x) SDL_SwapLE64(x)
|
||||
#define FAudio_swap64BE(x) SDL_SwapBE64(x)
|
||||
#endif
|
||||
|
||||
/* Easy Macros */
|
||||
|
|
|
@ -207,7 +207,7 @@ CREDITS
|
|||
* binding various stdlib functions stb.h uses to FAudio's stdlib.
|
||||
* -flibit
|
||||
*/
|
||||
#ifndef FAUDIO_WIN32_PLATFORM
|
||||
#ifndef NO_MEMCPY_OVERRIDE
|
||||
#ifdef memcpy /* Thanks Apple! */
|
||||
#undef memcpy
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue