Commit a084fd05 authored by Alexandre Julliard's avatar Alexandre Julliard

faudio: Import upstream release 23.10.

parent b6852f6b
......@@ -494,7 +494,7 @@ extern FAudioGUID DATAFORMAT_SUBTYPE_IEEE_FLOAT;
#define FAUDIO_ABI_VERSION 0
#define FAUDIO_MAJOR_VERSION 23
#define FAUDIO_MINOR_VERSION 7
#define FAUDIO_MINOR_VERSION 10
#define FAUDIO_PATCH_VERSION 0
#define FAUDIO_COMPILED_VERSION ( \
......
......@@ -1274,7 +1274,7 @@ static inline void CalculateMatrix(
}
}
}
else
else if (curConfig != NULL)
{
listenerToEmitter = VectorScale(emitterToListener, -1.0f);
......@@ -1351,8 +1351,10 @@ static inline void CalculateMatrix(
}
}
}
}
else
{
FAudio_assert(0 && "Config info not found!");
}
/* TODO: add post check to validate values
......
......@@ -39,6 +39,8 @@
#define FACT_CONTENT_VERSION_3_4 45
#define FACT_CONTENT_VERSION_3_1 44
#define FACT_CONTENT_VERSION_3_0 43
#define FACT_CONTENT_VERSION_2_4 41
#define FACT_CONTENT_VERSION_2_0 37
static inline int FACT_INTERNAL_SupportedContent(uint16_t version)
{
......@@ -3105,7 +3107,17 @@ uint32_t FACT_INTERNAL_ParseWaveBank(
#define DOSWAP_64(x) x = FAudio_swap64BE(x)
fileOffset = offset;
READ(&header, sizeof(header))
FAudio_zero(&header, sizeof(header));
READ(&header.dwSignature, sizeof(header.dwSignature));
READ(&header.dwVersion, sizeof(header.dwVersion));
if (header.dwVersion > FACT_CONTENT_VERSION_2_4)
{
READ(&header.dwHeaderVersion, sizeof(header.dwHeaderVersion));
}
READ(&header.Segments, sizeof(header.Segments));
se = header.dwSignature == 0x57424E44;
if (se)
{
......@@ -3123,12 +3135,20 @@ uint32_t FACT_INTERNAL_ParseWaveBank(
return -1; /* TODO: NOT XACT FILE */
}
if (!FACT_INTERNAL_SupportedContent(header.dwVersion))
/* We support all Wavebank versions - Restore when SoundBank support them also. */
/*if (!FACT_INTERNAL_SupportedContent(header.dwVersion))
{
return -2;
}
*/
if ( header.dwVersion < FACT_CONTENT_VERSION_2_4 ||
header.dwVersion > FACT_CONTENT_VERSION )
{
return -2;
}
if (!FACT_INTERNAL_SupportedWBContent(header.dwHeaderVersion))
if ( header.dwVersion > FACT_CONTENT_VERSION_2_4 &&
!FACT_INTERNAL_SupportedWBContent(header.dwHeaderVersion) )
{
return -3;
}
......
......@@ -48,7 +48,7 @@
/* AArch64 guarantees NEON. */
#define NEED_SCALAR_CONVERTER_FALLBACKS 0
#elif __MACOSX__
#elif __MACOSX__ && !defined(__POWERPC__)
/* Some build systems may need to specify this. */
#if !defined(__SSE2__) && !defined(__ARM_NEON__)
#error macOS does not have SSE2/NEON? Bad compiler?
......
......@@ -444,8 +444,8 @@ uint32_t FAudio_PlatformGetDeviceDetails(
hr = IMMDevice_GetId(device, &str);
FAudio_assert(!FAILED(hr) && "Failed to get audio endpoint id!");
lstrcpynW(details->DeviceID, str, ARRAYSIZE(details->DeviceID) - 1);
lstrcpynW(details->DisplayName, str, ARRAYSIZE(details->DisplayName) - 1);
lstrcpynW((WCHAR *)details->DeviceID, str, ARRAYSIZE(details->DeviceID) - 1);
lstrcpynW((WCHAR *)details->DisplayName, str, ARRAYSIZE(details->DisplayName) - 1);
CoTaskMemFree(str);
hr = IMMDevice_Activate(
......@@ -739,7 +739,7 @@ FAudioIOStream* FAudio_memopen(void *mem, int len)
uint8_t* FAudio_memptr(FAudioIOStream *io, size_t offset)
{
struct FAudio_mem *memio = io->data;
return memio->mem + offset;
return (uint8_t *)memio->mem + offset;
}
void FAudio_close(FAudioIOStream *io)
......@@ -896,7 +896,7 @@ FAUDIOAPI float XNA_PlaySong(const char *name)
IMFAttributes *attributes = NULL;
IMFMediaType *media_type = NULL;
UINT32 channels, samplerate;
UINT64 duration;
INT64 duration;
PROPVARIANT var;
HRESULT hr;
WCHAR filename_w[MAX_PATH];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment