Commit fa42210c authored by Alexandre Julliard's avatar Alexandre Julliard

faudio: Import upstream release 24.02.

parent 6e9d2140
/* 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
......
/* 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
......
/* 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
......
/* 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
......
/* 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
......
/* 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
......
/* 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
......
/* 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 ( \
......
/* 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
......
/* 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
......
/* 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
......
/* 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
......
/* 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
......
/* 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
......
/* 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
......
/* 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
......
/* 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
......
/* 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
......
/* 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
......
/* 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
......
/* 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
......
/* 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
......
/* 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
......
/* 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
......
/* 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
......
/* 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
......
/* 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(
......
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