faudio: Import upstream release 21.11.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
1b443bd516
commit
da89825f98
|
@ -485,7 +485,7 @@ extern FAudioGUID DATAFORMAT_SUBTYPE_IEEE_FLOAT;
|
|||
|
||||
#define FAUDIO_ABI_VERSION 0
|
||||
#define FAUDIO_MAJOR_VERSION 21
|
||||
#define FAUDIO_MINOR_VERSION 10
|
||||
#define FAUDIO_MINOR_VERSION 11
|
||||
#define FAUDIO_PATCH_VERSION 0
|
||||
|
||||
#define FAUDIO_COMPILED_VERSION ( \
|
||||
|
|
|
@ -2415,20 +2415,7 @@ uint32_t FACTCue_Destroy(FACTCue *pCue)
|
|||
FAudio_assert(cue != NULL && "Could not find Cue reference!");
|
||||
|
||||
pCue->parentBank->parentEngine->pFree(pCue->variableValues);
|
||||
if (pCue->notifyOnDestroy || pCue->parentBank->parentEngine->notifications & NOTIFY_CUEDESTROY)
|
||||
{
|
||||
note.type = FACTNOTIFICATIONTYPE_CUEDESTROYED;
|
||||
note.cue.pCue = pCue;
|
||||
if (pCue->parentBank->parentEngine->notifications & NOTIFY_CUEDESTROY)
|
||||
{
|
||||
note.pvContext = pCue->parentBank->parentEngine->cue_context;
|
||||
}
|
||||
else
|
||||
{
|
||||
note.pvContext = pCue->usercontext;
|
||||
}
|
||||
pCue->parentBank->parentEngine->notificationCallback(¬e);
|
||||
}
|
||||
FACT_INTERNAL_SendCueNotification(pCue, NOTIFY_CUEDESTROY, FACTNOTIFICATIONTYPE_CUEDESTROYED);
|
||||
|
||||
mutex = pCue->parentBank->parentEngine->apiLock;
|
||||
pCue->parentBank->parentEngine->pFree(pCue);
|
||||
|
@ -2679,6 +2666,8 @@ uint32_t FACTCue_Stop(FACTCue *pCue, uint32_t dwFlags)
|
|||
}
|
||||
}
|
||||
|
||||
FACT_INTERNAL_SendCueNotification(pCue, NOTIFY_CUESTOP, FACTNOTIFICATIONTYPE_CUESTOP);
|
||||
|
||||
FAudio_PlatformUnlockMutex(pCue->parentBank->parentEngine->apiLock);
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -2453,7 +2453,9 @@ uint32_t FAudioSourceVoice_SubmitSourceBuffer(
|
|||
|
||||
FAudio_assert(voice->type == FAUDIO_VOICE_SOURCE);
|
||||
#ifdef HAVE_WMADEC
|
||||
FAudio_assert( (voice->src.wmadec != NULL && (pBufferWMA != NULL || voice->src.format->wFormatTag == FAUDIO_FORMAT_XMAUDIO2)) ||
|
||||
FAudio_assert( (voice->src.wmadec != NULL && (pBufferWMA != NULL ||
|
||||
(voice->src.format->wFormatTag == FAUDIO_FORMAT_XMAUDIO2 ||
|
||||
voice->src.format->wFormatTag == FAUDIO_FORMAT_EXTENSIBLE))) ||
|
||||
(voice->src.wmadec == NULL && (pBufferWMA == NULL && voice->src.format->wFormatTag != FAUDIO_FORMAT_XMAUDIO2)) );
|
||||
#endif /* HAVE_WMADEC */
|
||||
|
||||
|
|
|
@ -507,7 +507,8 @@ static FAudio_ChannelPositionFlags FAudio_GetChannelPositionFlags(int32_t total_
|
|||
case 3:
|
||||
return Position_Right | Position_Rear;
|
||||
}
|
||||
|
||||
FAudio_assert(0 && "Unsupported channel count");
|
||||
break;
|
||||
case 5:
|
||||
switch (channel)
|
||||
{
|
||||
|
@ -522,7 +523,8 @@ static FAudio_ChannelPositionFlags FAudio_GetChannelPositionFlags(int32_t total_
|
|||
case 4:
|
||||
return Position_Right | Position_Rear;
|
||||
}
|
||||
|
||||
FAudio_assert(0 && "Unsupported channel count");
|
||||
break;
|
||||
default:
|
||||
FAudio_assert(0 && "Unsupported channel count");
|
||||
break;
|
||||
|
|
|
@ -228,8 +228,8 @@ void FAudio_PlatformInit(
|
|||
FAudio_assert(!FAILED(hr) && "Failed to create audio client!");
|
||||
IMMDevice_Release(device);
|
||||
|
||||
if (flags & FAUDIO_1024_QUANTUM) duration = 21330;
|
||||
else duration = 30000;
|
||||
if (flags & FAUDIO_1024_QUANTUM) duration = 213333;
|
||||
else duration = 100000;
|
||||
|
||||
hr = IAudioClient_IsFormatSupported(
|
||||
data->client,
|
||||
|
@ -250,7 +250,7 @@ void FAudio_PlatformInit(
|
|||
data->client,
|
||||
AUDCLNT_SHAREMODE_SHARED,
|
||||
AUDCLNT_STREAMFLAGS_EVENTCALLBACK,
|
||||
duration,
|
||||
duration * 3,
|
||||
0,
|
||||
&args->format.Format,
|
||||
&GUID_NULL
|
||||
|
@ -287,7 +287,8 @@ void FAudio_PlatformInit(
|
|||
args->events[0] = audioEvent;
|
||||
args->events[1] = data->stopEvent;
|
||||
args->audio = audio;
|
||||
args->updateSize = args->format.Format.nSamplesPerSec / 100;
|
||||
if (flags & FAUDIO_1024_QUANTUM) args->updateSize = args->format.Format.nSamplesPerSec / (1000.0 / (64.0 / 3.0));
|
||||
else args->updateSize = args->format.Format.nSamplesPerSec / 100;
|
||||
|
||||
data->audioThread = CreateThread(NULL, 0, &FAudio_AudioClientThread, args, 0, NULL);
|
||||
FAudio_assert(!!data->audioThread && "Failed to create audio client thread!");
|
||||
|
@ -622,6 +623,7 @@ static int FAUDIOCALL FAudio_mem_close(void *data)
|
|||
{
|
||||
if (!data) return 0;
|
||||
FAudio_free(data);
|
||||
return 0;
|
||||
}
|
||||
|
||||
FAudioIOStream* FAudio_memopen(void *mem, int len)
|
||||
|
|
Loading…
Reference in New Issue