faudio: Import upstream release 24.02.
This commit is contained in:
parent
6e9d214096
commit
fa42210c49
28 changed files with 38 additions and 31 deletions
|
@ -1,6 +1,6 @@
|
|||
/* FAudio - XAudio Reimplementation for FNA
|
||||
*
|
||||
* Copyright (c) 2011-2023 Ethan Lee, Luigi Auriemma, and the MonoGame Team
|
||||
* Copyright (c) 2011-2024 Ethan Lee, Luigi Auriemma, and the MonoGame Team
|
||||
*
|
||||
* This software is provided 'as-is', without any express or implied warranty.
|
||||
* In no event will the authors be held liable for any damages arising from
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* FAudio - XAudio Reimplementation for FNA
|
||||
*
|
||||
* Copyright (c) 2011-2023 Ethan Lee, Luigi Auriemma, and the MonoGame Team
|
||||
* Copyright (c) 2011-2024 Ethan Lee, Luigi Auriemma, and the MonoGame Team
|
||||
*
|
||||
* This software is provided 'as-is', without any express or implied warranty.
|
||||
* In no event will the authors be held liable for any damages arising from
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* FAudio - XAudio Reimplementation for FNA
|
||||
*
|
||||
* Copyright (c) 2011-2023 Ethan Lee, Luigi Auriemma, and the MonoGame Team
|
||||
* Copyright (c) 2011-2024 Ethan Lee, Luigi Auriemma, and the MonoGame Team
|
||||
*
|
||||
* This software is provided 'as-is', without any express or implied warranty.
|
||||
* In no event will the authors be held liable for any damages arising from
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* FAudio - XAudio Reimplementation for FNA
|
||||
*
|
||||
* Copyright (c) 2011-2023 Ethan Lee, Luigi Auriemma, and the MonoGame Team
|
||||
* Copyright (c) 2011-2024 Ethan Lee, Luigi Auriemma, and the MonoGame Team
|
||||
*
|
||||
* This software is provided 'as-is', without any express or implied warranty.
|
||||
* In no event will the authors be held liable for any damages arising from
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* FAudio - XAudio Reimplementation for FNA
|
||||
*
|
||||
* Copyright (c) 2011-2023 Ethan Lee, Luigi Auriemma, and the MonoGame Team
|
||||
* Copyright (c) 2011-2024 Ethan Lee, Luigi Auriemma, and the MonoGame Team
|
||||
*
|
||||
* This software is provided 'as-is', without any express or implied warranty.
|
||||
* In no event will the authors be held liable for any damages arising from
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* FAudio - XAudio Reimplementation for FNA
|
||||
*
|
||||
* Copyright (c) 2011-2023 Ethan Lee, Luigi Auriemma, and the MonoGame Team
|
||||
* Copyright (c) 2011-2024 Ethan Lee, Luigi Auriemma, and the MonoGame Team
|
||||
*
|
||||
* This software is provided 'as-is', without any express or implied warranty.
|
||||
* In no event will the authors be held liable for any damages arising from
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* FAudio - XAudio Reimplementation for FNA
|
||||
*
|
||||
* Copyright (c) 2011-2023 Ethan Lee, Luigi Auriemma, and the MonoGame Team
|
||||
* Copyright (c) 2011-2024 Ethan Lee, Luigi Auriemma, and the MonoGame Team
|
||||
*
|
||||
* This software is provided 'as-is', without any express or implied warranty.
|
||||
* In no event will the authors be held liable for any damages arising from
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* FAudio - XAudio Reimplementation for FNA
|
||||
*
|
||||
* Copyright (c) 2011-2023 Ethan Lee, Luigi Auriemma, and the MonoGame Team
|
||||
* Copyright (c) 2011-2024 Ethan Lee, Luigi Auriemma, and the MonoGame Team
|
||||
*
|
||||
* This software is provided 'as-is', without any express or implied warranty.
|
||||
* In no event will the authors be held liable for any damages arising from
|
||||
|
@ -493,8 +493,8 @@ extern FAudioGUID DATAFORMAT_SUBTYPE_IEEE_FLOAT;
|
|||
#define FAUDIO_TARGET_VERSION 8 /* Targeting compatibility with XAudio 2.8 */
|
||||
|
||||
#define FAUDIO_ABI_VERSION 0
|
||||
#define FAUDIO_MAJOR_VERSION 23
|
||||
#define FAUDIO_MINOR_VERSION 12
|
||||
#define FAUDIO_MAJOR_VERSION 24
|
||||
#define FAUDIO_MINOR_VERSION 2
|
||||
#define FAUDIO_PATCH_VERSION 0
|
||||
|
||||
#define FAUDIO_COMPILED_VERSION ( \
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* FAudio - XAudio Reimplementation for FNA
|
||||
*
|
||||
* Copyright (c) 2011-2023 Ethan Lee, Luigi Auriemma, and the MonoGame Team
|
||||
* Copyright (c) 2011-2024 Ethan Lee, Luigi Auriemma, and the MonoGame Team
|
||||
*
|
||||
* This software is provided 'as-is', without any express or implied warranty.
|
||||
* In no event will the authors be held liable for any damages arising from
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* FAudio - XAudio Reimplementation for FNA
|
||||
*
|
||||
* Copyright (c) 2011-2023 Ethan Lee, Luigi Auriemma, and the MonoGame Team
|
||||
* Copyright (c) 2011-2024 Ethan Lee, Luigi Auriemma, and the MonoGame Team
|
||||
*
|
||||
* This software is provided 'as-is', without any express or implied warranty.
|
||||
* In no event will the authors be held liable for any damages arising from
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* FAudio - XAudio Reimplementation for FNA
|
||||
*
|
||||
* Copyright (c) 2011-2023 Ethan Lee, Luigi Auriemma, and the MonoGame Team
|
||||
* Copyright (c) 2011-2024 Ethan Lee, Luigi Auriemma, and the MonoGame Team
|
||||
*
|
||||
* This software is provided 'as-is', without any express or implied warranty.
|
||||
* In no event will the authors be held liable for any damages arising from
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* FAudio - XAudio Reimplementation for FNA
|
||||
*
|
||||
* Copyright (c) 2011-2023 Ethan Lee, Luigi Auriemma, and the MonoGame Team
|
||||
* Copyright (c) 2011-2024 Ethan Lee, Luigi Auriemma, and the MonoGame Team
|
||||
*
|
||||
* This software is provided 'as-is', without any express or implied warranty.
|
||||
* In no event will the authors be held liable for any damages arising from
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* FAudio - XAudio Reimplementation for FNA
|
||||
*
|
||||
* Copyright (c) 2011-2023 Ethan Lee, Luigi Auriemma, and the MonoGame Team
|
||||
* Copyright (c) 2011-2024 Ethan Lee, Luigi Auriemma, and the MonoGame Team
|
||||
*
|
||||
* This software is provided 'as-is', without any express or implied warranty.
|
||||
* In no event will the authors be held liable for any damages arising from
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* FAudio - XAudio Reimplementation for FNA
|
||||
*
|
||||
* Copyright (c) 2011-2023 Ethan Lee, Luigi Auriemma, and the MonoGame Team
|
||||
* Copyright (c) 2011-2024 Ethan Lee, Luigi Auriemma, and the MonoGame Team
|
||||
*
|
||||
* This software is provided 'as-is', without any express or implied warranty.
|
||||
* In no event will the authors be held liable for any damages arising from
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* FAudio - XAudio Reimplementation for FNA
|
||||
*
|
||||
* Copyright (c) 2011-2023 Ethan Lee, Luigi Auriemma, and the MonoGame Team
|
||||
* Copyright (c) 2011-2024 Ethan Lee, Luigi Auriemma, and the MonoGame Team
|
||||
*
|
||||
* This software is provided 'as-is', without any express or implied warranty.
|
||||
* In no event will the authors be held liable for any damages arising from
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* FAudio - XAudio Reimplementation for FNA
|
||||
*
|
||||
* Copyright (c) 2011-2023 Ethan Lee, Luigi Auriemma, and the MonoGame Team
|
||||
* Copyright (c) 2011-2024 Ethan Lee, Luigi Auriemma, and the MonoGame Team
|
||||
*
|
||||
* This software is provided 'as-is', without any express or implied warranty.
|
||||
* In no event will the authors be held liable for any damages arising from
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* FAudio - XAudio Reimplementation for FNA
|
||||
*
|
||||
* Copyright (c) 2011-2023 Ethan Lee, Luigi Auriemma, and the MonoGame Team
|
||||
* Copyright (c) 2011-2024 Ethan Lee, Luigi Auriemma, and the MonoGame Team
|
||||
*
|
||||
* This software is provided 'as-is', without any express or implied warranty.
|
||||
* In no event will the authors be held liable for any damages arising from
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* FAudio - XAudio Reimplementation for FNA
|
||||
*
|
||||
* Copyright (c) 2011-2023 Ethan Lee, Luigi Auriemma, and the MonoGame Team
|
||||
* Copyright (c) 2011-2024 Ethan Lee, Luigi Auriemma, and the MonoGame Team
|
||||
*
|
||||
* This software is provided 'as-is', without any express or implied warranty.
|
||||
* In no event will the authors be held liable for any damages arising from
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* FAudio - XAudio Reimplementation for FNA
|
||||
*
|
||||
* Copyright (c) 2011-2023 Ethan Lee, Luigi Auriemma, and the MonoGame Team
|
||||
* Copyright (c) 2011-2024 Ethan Lee, Luigi Auriemma, and the MonoGame Team
|
||||
*
|
||||
* This software is provided 'as-is', without any express or implied warranty.
|
||||
* In no event will the authors be held liable for any damages arising from
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* FAudio - XAudio Reimplementation for FNA
|
||||
*
|
||||
* Copyright (c) 2011-2023 Ethan Lee, Luigi Auriemma, and the MonoGame Team
|
||||
* Copyright (c) 2011-2024 Ethan Lee, Luigi Auriemma, and the MonoGame Team
|
||||
*
|
||||
* This software is provided 'as-is', without any express or implied warranty.
|
||||
* In no event will the authors be held liable for any damages arising from
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* FAudio - XAudio Reimplementation for FNA
|
||||
*
|
||||
* Copyright (c) 2011-2023 Ethan Lee, Luigi Auriemma, and the MonoGame Team
|
||||
* Copyright (c) 2011-2024 Ethan Lee, Luigi Auriemma, and the MonoGame Team
|
||||
*
|
||||
* This software is provided 'as-is', without any express or implied warranty.
|
||||
* In no event will the authors be held liable for any damages arising from
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* FAudio - XAudio Reimplementation for FNA
|
||||
*
|
||||
* Copyright (c) 2011-2023 Ethan Lee, Luigi Auriemma, and the MonoGame Team
|
||||
* Copyright (c) 2011-2024 Ethan Lee, Luigi Auriemma, and the MonoGame Team
|
||||
*
|
||||
* This software is provided 'as-is', without any express or implied warranty.
|
||||
* In no event will the authors be held liable for any damages arising from
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* FAudio - XAudio Reimplementation for FNA
|
||||
*
|
||||
* Copyright (c) 2011-2023 Ethan Lee, Luigi Auriemma, and the MonoGame Team
|
||||
* Copyright (c) 2011-2024 Ethan Lee, Luigi Auriemma, and the MonoGame Team
|
||||
*
|
||||
* This software is provided 'as-is', without any express or implied warranty.
|
||||
* In no event will the authors be held liable for any damages arising from
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* FAudio - XAudio Reimplementation for FNA
|
||||
*
|
||||
* Copyright (c) 2011-2023 Ethan Lee, Luigi Auriemma, and the MonoGame Team
|
||||
* Copyright (c) 2011-2024 Ethan Lee, Luigi Auriemma, and the MonoGame Team
|
||||
*
|
||||
* This software is provided 'as-is', without any express or implied warranty.
|
||||
* In no event will the authors be held liable for any damages arising from
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* FAudio - XAudio Reimplementation for FNA
|
||||
*
|
||||
* Copyright (c) 2011-2023 Ethan Lee, Luigi Auriemma, and the MonoGame Team
|
||||
* Copyright (c) 2011-2024 Ethan Lee, Luigi Auriemma, and the MonoGame Team
|
||||
*
|
||||
* This software is provided 'as-is', without any express or implied warranty.
|
||||
* In no event will the authors be held liable for any damages arising from
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* FAudio - XAudio Reimplementation for FNA
|
||||
*
|
||||
* Copyright (c) 2011-2023 Ethan Lee, Luigi Auriemma, and the MonoGame Team
|
||||
* Copyright (c) 2011-2024 Ethan Lee, Luigi Auriemma, and the MonoGame Team
|
||||
*
|
||||
* This software is provided 'as-is', without any express or implied warranty.
|
||||
* In no event will the authors be held liable for any damages arising from
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* FAudio - XAudio Reimplementation for FNA
|
||||
*
|
||||
* Copyright (c) 2011-2023 Ethan Lee, Luigi Auriemma, and the MonoGame Team
|
||||
* Copyright (c) 2011-2024 Ethan Lee, Luigi Auriemma, and the MonoGame Team
|
||||
*
|
||||
* This software is provided 'as-is', without any express or implied warranty.
|
||||
* In no event will the authors be held liable for any damages arising from
|
||||
|
|
|
@ -1300,6 +1300,7 @@ error:
|
|||
uint32_t FAudio_WMADEC_init(FAudioSourceVoice *voice, uint32_t type)
|
||||
{
|
||||
static const uint8_t fake_codec_data[16] = {0, 0, 0, 0, 31, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
|
||||
uint8_t fake_codec_data_wma3[18] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 224, 0, 0, 0};
|
||||
const FAudioWaveFormatExtensible *wfx = (FAudioWaveFormatExtensible *)voice->src.format;
|
||||
struct FAudioWMADEC *impl;
|
||||
MFT_OUTPUT_STREAM_INFO info = {0};
|
||||
|
@ -1361,11 +1362,17 @@ uint32_t FAudio_WMADEC_init(FAudioSourceVoice *voice, uint32_t type)
|
|||
FAudio_assert(!FAILED(hr) && "Failed set input block align!");
|
||||
break;
|
||||
case FAUDIO_FORMAT_WMAUDIO3:
|
||||
*(uint16_t *)fake_codec_data_wma3 = voice->src.format->wBitsPerSample;
|
||||
for (i = 0; i < voice->src.format->nChannels; i++)
|
||||
{
|
||||
fake_codec_data_wma3[2] <<= 1;
|
||||
fake_codec_data_wma3[2] |= 1;
|
||||
}
|
||||
hr = IMFMediaType_SetBlob(
|
||||
media_type,
|
||||
&MF_MT_USER_DATA,
|
||||
(void *)&wfx->Samples,
|
||||
wfx->Format.cbSize
|
||||
(void *)fake_codec_data_wma3,
|
||||
sizeof(fake_codec_data_wma3)
|
||||
);
|
||||
FAudio_assert(!FAILED(hr) && "Failed set codec private data!");
|
||||
hr = IMFMediaType_SetGUID(
|
||||
|
|
Loading…
Add table
Reference in a new issue