faudio: Import upstream release 22.02.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
0894a4ad48
commit
6446382c74
|
@ -485,7 +485,7 @@ extern FAudioGUID DATAFORMAT_SUBTYPE_IEEE_FLOAT;
|
|||
|
||||
#define FAUDIO_ABI_VERSION 0
|
||||
#define FAUDIO_MAJOR_VERSION 22
|
||||
#define FAUDIO_MINOR_VERSION 1
|
||||
#define FAUDIO_MINOR_VERSION 2
|
||||
#define FAUDIO_PATCH_VERSION 0
|
||||
|
||||
#define FAUDIO_COMPILED_VERSION ( \
|
||||
|
|
|
@ -399,6 +399,12 @@ uint32_t FAudio_PlatformGetDeviceCount(void)
|
|||
eConsole,
|
||||
&device
|
||||
);
|
||||
|
||||
if (hr == E_NOTFOUND) {
|
||||
FAudio_PlatformRelease();
|
||||
return 0;
|
||||
}
|
||||
|
||||
FAudio_assert(!FAILED(hr) && "Failed to get default audio endpoint!");
|
||||
|
||||
IMMDevice_Release(device);
|
||||
|
@ -1191,8 +1197,8 @@ static void FAudio_INTERNAL_DecodeWMAMF(
|
|||
uint32_t samples
|
||||
) {
|
||||
const FAudioWaveFormatExtensible *wfx = (FAudioWaveFormatExtensible *)voice->src.format;
|
||||
size_t samples_pos, samples_size, copy_size = 0;
|
||||
struct FAudioWMADEC *impl = voice->src.wmadec;
|
||||
size_t samples_pos, samples_size, copy_size;
|
||||
HRESULT hr;
|
||||
|
||||
LOG_FUNC_ENTER(voice->audio)
|
||||
|
@ -1264,8 +1270,12 @@ static void FAudio_INTERNAL_DecodeWMAMF(
|
|||
impl->input_size = 0;
|
||||
}
|
||||
|
||||
copy_size = FAudio_clamp(impl->output_pos - samples_pos, 0, samples_size);
|
||||
FAudio_memcpy(decodeCache, impl->output_buf + samples_pos, copy_size);
|
||||
if (impl->output_pos > samples_pos)
|
||||
{
|
||||
copy_size = FAudio_min(impl->output_pos - samples_pos, samples_size);
|
||||
FAudio_memcpy(decodeCache, impl->output_buf + samples_pos, copy_size);
|
||||
}
|
||||
FAudio_zero(decodeCache + copy_size, samples_size - copy_size);
|
||||
LOG_INFO(
|
||||
voice->audio,
|
||||
"decoded %x / %x bytes, copied %x / %x bytes",
|
||||
|
|
Loading…
Reference in New Issue