mirror of
git://source.winehq.org/git/wine.git
synced 2024-10-06 09:35:52 +00:00
faudio: Import upstream release 22.11.
This commit is contained in:
parent
1d636da205
commit
927f0530f4
|
@ -485,7 +485,7 @@ extern FAudioGUID DATAFORMAT_SUBTYPE_IEEE_FLOAT;
|
||||||
|
|
||||||
#define FAUDIO_ABI_VERSION 0
|
#define FAUDIO_ABI_VERSION 0
|
||||||
#define FAUDIO_MAJOR_VERSION 22
|
#define FAUDIO_MAJOR_VERSION 22
|
||||||
#define FAUDIO_MINOR_VERSION 8
|
#define FAUDIO_MINOR_VERSION 11
|
||||||
#define FAUDIO_PATCH_VERSION 0
|
#define FAUDIO_PATCH_VERSION 0
|
||||||
|
|
||||||
#define FAUDIO_COMPILED_VERSION ( \
|
#define FAUDIO_COMPILED_VERSION ( \
|
||||||
|
|
|
@ -2409,7 +2409,6 @@ uint32_t FACTCue_Destroy(FACTCue *pCue)
|
||||||
{
|
{
|
||||||
FACTCue *cue, *prev;
|
FACTCue *cue, *prev;
|
||||||
FAudioMutex mutex;
|
FAudioMutex mutex;
|
||||||
FACTNotification note;
|
|
||||||
if (pCue == NULL)
|
if (pCue == NULL)
|
||||||
{
|
{
|
||||||
return 1;
|
return 1;
|
||||||
|
|
|
@ -678,16 +678,27 @@ uint32_t FAudio_CreateMasteringVoice(
|
||||||
uint32_t DeviceIndex,
|
uint32_t DeviceIndex,
|
||||||
const FAudioEffectChain *pEffectChain
|
const FAudioEffectChain *pEffectChain
|
||||||
) {
|
) {
|
||||||
FAudioDeviceDetails details;
|
|
||||||
|
|
||||||
LOG_API_ENTER(audio)
|
LOG_API_ENTER(audio)
|
||||||
|
|
||||||
/* For now we only support one allocated master voice at a time */
|
/* For now we only support one allocated master voice at a time */
|
||||||
FAudio_assert(audio->master == NULL);
|
FAudio_assert(audio->master == NULL);
|
||||||
|
|
||||||
if (FAudio_GetDeviceDetails(audio, DeviceIndex, &details) != 0)
|
if ( InputChannels == FAUDIO_DEFAULT_CHANNELS ||
|
||||||
|
InputSampleRate == FAUDIO_DEFAULT_SAMPLERATE )
|
||||||
{
|
{
|
||||||
return FAUDIO_E_INVALID_CALL;
|
FAudioDeviceDetails details;
|
||||||
|
if (FAudio_GetDeviceDetails(audio, DeviceIndex, &details) != 0)
|
||||||
|
{
|
||||||
|
return FAUDIO_E_INVALID_CALL;
|
||||||
|
}
|
||||||
|
if (InputChannels == FAUDIO_DEFAULT_CHANNELS)
|
||||||
|
{
|
||||||
|
InputChannels = details.OutputFormat.Format.nChannels;
|
||||||
|
}
|
||||||
|
if (InputSampleRate == FAUDIO_DEFAULT_SAMPLERATE)
|
||||||
|
{
|
||||||
|
InputSampleRate = details.OutputFormat.Format.nSamplesPerSec;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
*ppMasteringVoice = (FAudioMasteringVoice*) audio->pMalloc(sizeof(FAudioVoice));
|
*ppMasteringVoice = (FAudioMasteringVoice*) audio->pMalloc(sizeof(FAudioVoice));
|
||||||
|
@ -704,12 +715,8 @@ uint32_t FAudio_CreateMasteringVoice(
|
||||||
(*ppMasteringVoice)->volume = 1.0f;
|
(*ppMasteringVoice)->volume = 1.0f;
|
||||||
|
|
||||||
/* Master Properties */
|
/* Master Properties */
|
||||||
(*ppMasteringVoice)->master.inputChannels = (InputChannels == FAUDIO_DEFAULT_CHANNELS) ?
|
(*ppMasteringVoice)->master.inputChannels = InputChannels;
|
||||||
details.OutputFormat.Format.nChannels :
|
(*ppMasteringVoice)->master.inputSampleRate = InputSampleRate;
|
||||||
InputChannels;
|
|
||||||
(*ppMasteringVoice)->master.inputSampleRate = (InputSampleRate == FAUDIO_DEFAULT_SAMPLERATE) ?
|
|
||||||
details.OutputFormat.Format.nSamplesPerSec :
|
|
||||||
InputSampleRate;
|
|
||||||
|
|
||||||
/* Sends/Effects */
|
/* Sends/Effects */
|
||||||
FAudio_zero(&(*ppMasteringVoice)->sends, sizeof(FAudioVoiceSends));
|
FAudio_zero(&(*ppMasteringVoice)->sends, sizeof(FAudioVoiceSends));
|
||||||
|
|
|
@ -130,11 +130,13 @@ static inline float DspDelay_Process(DspDelay *filter, float sample_in)
|
||||||
return delay_out;
|
return delay_out;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* FIXME: This is currently unused! What was it for...? -flibit
|
||||||
static inline float DspDelay_Tap(DspDelay *filter, uint32_t delay)
|
static inline float DspDelay_Tap(DspDelay *filter, uint32_t delay)
|
||||||
{
|
{
|
||||||
FAudio_assert(delay <= filter->delay);
|
FAudio_assert(delay <= filter->delay);
|
||||||
return filter->buffer[(filter->write_idx - delay + filter->capacity) % filter->capacity];
|
return filter->buffer[(filter->write_idx - delay + filter->capacity) % filter->capacity];
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
static inline void DspDelay_Reset(DspDelay *filter)
|
static inline void DspDelay_Reset(DspDelay *filter)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue