Avoid more cases of an enum variable and type name clash
This commit is contained in:
parent
336b7b7799
commit
8b8f01e25d
58
Alc/alc.cpp
58
Alc/alc.cpp
@ -1523,13 +1523,13 @@ void SetDefaultWFXChannelOrder(ALCdevice *device)
|
|||||||
break;
|
break;
|
||||||
case DevFmtAmbi3D:
|
case DevFmtAmbi3D:
|
||||||
device->RealOut.ChannelName[0] = Aux0;
|
device->RealOut.ChannelName[0] = Aux0;
|
||||||
if(device->AmbiOrder > 0)
|
if(device->mAmbiOrder > 0)
|
||||||
{
|
{
|
||||||
device->RealOut.ChannelName[1] = Aux1;
|
device->RealOut.ChannelName[1] = Aux1;
|
||||||
device->RealOut.ChannelName[2] = Aux2;
|
device->RealOut.ChannelName[2] = Aux2;
|
||||||
device->RealOut.ChannelName[3] = Aux3;
|
device->RealOut.ChannelName[3] = Aux3;
|
||||||
}
|
}
|
||||||
if(device->AmbiOrder > 1)
|
if(device->mAmbiOrder > 1)
|
||||||
{
|
{
|
||||||
device->RealOut.ChannelName[4] = Aux4;
|
device->RealOut.ChannelName[4] = Aux4;
|
||||||
device->RealOut.ChannelName[5] = Aux5;
|
device->RealOut.ChannelName[5] = Aux5;
|
||||||
@ -1537,7 +1537,7 @@ void SetDefaultWFXChannelOrder(ALCdevice *device)
|
|||||||
device->RealOut.ChannelName[7] = Aux7;
|
device->RealOut.ChannelName[7] = Aux7;
|
||||||
device->RealOut.ChannelName[8] = Aux8;
|
device->RealOut.ChannelName[8] = Aux8;
|
||||||
}
|
}
|
||||||
if(device->AmbiOrder > 2)
|
if(device->mAmbiOrder > 2)
|
||||||
{
|
{
|
||||||
device->RealOut.ChannelName[9] = Aux9;
|
device->RealOut.ChannelName[9] = Aux9;
|
||||||
device->RealOut.ChannelName[10] = Aux10;
|
device->RealOut.ChannelName[10] = Aux10;
|
||||||
@ -1847,9 +1847,9 @@ static ALCenum UpdateDeviceParams(ALCdevice *device, const ALCint *attrList)
|
|||||||
device->FmtType = static_cast<enum DevFmtType>(stype);
|
device->FmtType = static_cast<enum DevFmtType>(stype);
|
||||||
if(schans == ALC_BFORMAT3D_SOFT)
|
if(schans == ALC_BFORMAT3D_SOFT)
|
||||||
{
|
{
|
||||||
device->AmbiOrder = aorder;
|
device->mAmbiOrder = aorder;
|
||||||
device->AmbiLayout = static_cast<enum AmbiLayout>(alayout);
|
device->mAmbiLayout = static_cast<enum AmbiLayout>(alayout);
|
||||||
device->AmbiScale = static_cast<enum AmbiNorm>(ascale);
|
device->mAmbiScale = static_cast<enum AmbiNorm>(ascale);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(numMono > INT_MAX-numStereo)
|
if(numMono > INT_MAX-numStereo)
|
||||||
@ -3227,13 +3227,13 @@ static ALCsizei GetIntegerv(ALCdevice *device, ALCenum param, ALCsizei size, ALC
|
|||||||
if(device->FmtChans == DevFmtAmbi3D)
|
if(device->FmtChans == DevFmtAmbi3D)
|
||||||
{
|
{
|
||||||
values[i++] = ALC_AMBISONIC_LAYOUT_SOFT;
|
values[i++] = ALC_AMBISONIC_LAYOUT_SOFT;
|
||||||
values[i++] = device->AmbiLayout;
|
values[i++] = device->mAmbiLayout;
|
||||||
|
|
||||||
values[i++] = ALC_AMBISONIC_SCALING_SOFT;
|
values[i++] = ALC_AMBISONIC_SCALING_SOFT;
|
||||||
values[i++] = device->AmbiScale;
|
values[i++] = device->mAmbiScale;
|
||||||
|
|
||||||
values[i++] = ALC_AMBISONIC_ORDER_SOFT;
|
values[i++] = ALC_AMBISONIC_ORDER_SOFT;
|
||||||
values[i++] = device->AmbiOrder;
|
values[i++] = device->mAmbiOrder;
|
||||||
}
|
}
|
||||||
|
|
||||||
values[i++] = ALC_FORMAT_CHANNELS_SOFT;
|
values[i++] = ALC_FORMAT_CHANNELS_SOFT;
|
||||||
@ -3332,7 +3332,7 @@ static ALCsizei GetIntegerv(ALCdevice *device, ALCenum param, ALCsizei size, ALC
|
|||||||
alcSetError(device, ALC_INVALID_DEVICE);
|
alcSetError(device, ALC_INVALID_DEVICE);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
values[0] = device->AmbiLayout;
|
values[0] = device->mAmbiLayout;
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
case ALC_AMBISONIC_SCALING_SOFT:
|
case ALC_AMBISONIC_SCALING_SOFT:
|
||||||
@ -3341,7 +3341,7 @@ static ALCsizei GetIntegerv(ALCdevice *device, ALCenum param, ALCsizei size, ALC
|
|||||||
alcSetError(device, ALC_INVALID_DEVICE);
|
alcSetError(device, ALC_INVALID_DEVICE);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
values[0] = device->AmbiScale;
|
values[0] = device->mAmbiScale;
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
case ALC_AMBISONIC_ORDER_SOFT:
|
case ALC_AMBISONIC_ORDER_SOFT:
|
||||||
@ -3350,7 +3350,7 @@ static ALCsizei GetIntegerv(ALCdevice *device, ALCenum param, ALCsizei size, ALC
|
|||||||
alcSetError(device, ALC_INVALID_DEVICE);
|
alcSetError(device, ALC_INVALID_DEVICE);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
values[0] = device->AmbiOrder;
|
values[0] = device->mAmbiOrder;
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
case ALC_MONO_SOURCES:
|
case ALC_MONO_SOURCES:
|
||||||
@ -3464,13 +3464,13 @@ ALC_API void ALC_APIENTRY alcGetInteger64vSOFT(ALCdevice *device, ALCenum pname,
|
|||||||
if(device->FmtChans == DevFmtAmbi3D)
|
if(device->FmtChans == DevFmtAmbi3D)
|
||||||
{
|
{
|
||||||
values[i++] = ALC_AMBISONIC_LAYOUT_SOFT;
|
values[i++] = ALC_AMBISONIC_LAYOUT_SOFT;
|
||||||
values[i++] = device->AmbiLayout;
|
values[i++] = device->mAmbiLayout;
|
||||||
|
|
||||||
values[i++] = ALC_AMBISONIC_SCALING_SOFT;
|
values[i++] = ALC_AMBISONIC_SCALING_SOFT;
|
||||||
values[i++] = device->AmbiScale;
|
values[i++] = device->mAmbiScale;
|
||||||
|
|
||||||
values[i++] = ALC_AMBISONIC_ORDER_SOFT;
|
values[i++] = ALC_AMBISONIC_ORDER_SOFT;
|
||||||
values[i++] = device->AmbiOrder;
|
values[i++] = device->mAmbiOrder;
|
||||||
}
|
}
|
||||||
|
|
||||||
values[i++] = ALC_FORMAT_CHANNELS_SOFT;
|
values[i++] = ALC_FORMAT_CHANNELS_SOFT;
|
||||||
@ -3908,8 +3908,8 @@ ALC_API ALCdevice* ALC_APIENTRY alcOpenDevice(const ALCchar *deviceName)
|
|||||||
device->FmtType = DevFmtTypeDefault;
|
device->FmtType = DevFmtTypeDefault;
|
||||||
device->Frequency = DEFAULT_OUTPUT_RATE;
|
device->Frequency = DEFAULT_OUTPUT_RATE;
|
||||||
device->IsHeadphones = AL_FALSE;
|
device->IsHeadphones = AL_FALSE;
|
||||||
device->AmbiLayout = AmbiLayout_Default;
|
device->mAmbiLayout = AmbiLayout_Default;
|
||||||
device->AmbiScale = AmbiNorm_Default;
|
device->mAmbiScale = AmbiNorm_Default;
|
||||||
device->LimiterState = ALC_TRUE;
|
device->LimiterState = ALC_TRUE;
|
||||||
device->NumUpdates = 3;
|
device->NumUpdates = 3;
|
||||||
device->UpdateSize = 1024;
|
device->UpdateSize = 1024;
|
||||||
@ -3947,7 +3947,7 @@ ALC_API ALCdevice* ALC_APIENTRY alcOpenDevice(const ALCchar *deviceName)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
device->FmtChans = iter->chans;
|
device->FmtChans = iter->chans;
|
||||||
device->AmbiOrder = iter->order;
|
device->mAmbiOrder = iter->order;
|
||||||
device->Flags |= DEVICE_CHANNELS_REQUEST;
|
device->Flags |= DEVICE_CHANNELS_REQUEST;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -4031,18 +4031,18 @@ ALC_API ALCdevice* ALC_APIENTRY alcOpenDevice(const ALCchar *deviceName)
|
|||||||
{
|
{
|
||||||
if(strcasecmp(fmt, "fuma") == 0)
|
if(strcasecmp(fmt, "fuma") == 0)
|
||||||
{
|
{
|
||||||
device->AmbiLayout = AmbiLayout_FuMa;
|
device->mAmbiLayout = AmbiLayout_FuMa;
|
||||||
device->AmbiScale = AmbiNorm_FuMa;
|
device->mAmbiScale = AmbiNorm_FuMa;
|
||||||
}
|
}
|
||||||
else if(strcasecmp(fmt, "acn+sn3d") == 0)
|
else if(strcasecmp(fmt, "acn+sn3d") == 0)
|
||||||
{
|
{
|
||||||
device->AmbiLayout = AmbiLayout_ACN;
|
device->mAmbiLayout = AmbiLayout_ACN;
|
||||||
device->AmbiScale = AmbiNorm_SN3D;
|
device->mAmbiScale = AmbiNorm_SN3D;
|
||||||
}
|
}
|
||||||
else if(strcasecmp(fmt, "acn+n3d") == 0)
|
else if(strcasecmp(fmt, "acn+n3d") == 0)
|
||||||
{
|
{
|
||||||
device->AmbiLayout = AmbiLayout_ACN;
|
device->mAmbiLayout = AmbiLayout_ACN;
|
||||||
device->AmbiScale = AmbiNorm_N3D;
|
device->mAmbiScale = AmbiNorm_N3D;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
ERR("Unsupported ambi-format: %s\n", fmt);
|
ERR("Unsupported ambi-format: %s\n", fmt);
|
||||||
@ -4145,9 +4145,9 @@ ALC_API ALCdevice* ALC_APIENTRY alcCaptureOpenDevice(const ALCchar *deviceName,
|
|||||||
}
|
}
|
||||||
device->Flags |= DEVICE_CHANNELS_REQUEST | DEVICE_SAMPLE_TYPE_REQUEST;
|
device->Flags |= DEVICE_CHANNELS_REQUEST | DEVICE_SAMPLE_TYPE_REQUEST;
|
||||||
device->IsHeadphones = AL_FALSE;
|
device->IsHeadphones = AL_FALSE;
|
||||||
device->AmbiOrder = 0;
|
device->mAmbiOrder = 0;
|
||||||
device->AmbiLayout = AmbiLayout_Default;
|
device->mAmbiLayout = AmbiLayout_Default;
|
||||||
device->AmbiScale = AmbiNorm_Default;
|
device->mAmbiScale = AmbiNorm_Default;
|
||||||
|
|
||||||
device->UpdateSize = samples;
|
device->UpdateSize = samples;
|
||||||
device->NumUpdates = 1;
|
device->NumUpdates = 1;
|
||||||
@ -4316,8 +4316,8 @@ ALC_API ALCdevice* ALC_APIENTRY alcLoopbackOpenDeviceSOFT(const ALCchar *deviceN
|
|||||||
device->FmtChans = DevFmtChannelsDefault;
|
device->FmtChans = DevFmtChannelsDefault;
|
||||||
device->FmtType = DevFmtTypeDefault;
|
device->FmtType = DevFmtTypeDefault;
|
||||||
device->IsHeadphones = AL_FALSE;
|
device->IsHeadphones = AL_FALSE;
|
||||||
device->AmbiLayout = AmbiLayout_Default;
|
device->mAmbiLayout = AmbiLayout_Default;
|
||||||
device->AmbiScale = AmbiNorm_Default;
|
device->mAmbiScale = AmbiNorm_Default;
|
||||||
|
|
||||||
ConfigValueUInt(nullptr, nullptr, "sources", &device->SourcesMax);
|
ConfigValueUInt(nullptr, nullptr, "sources", &device->SourcesMax);
|
||||||
if(device->SourcesMax == 0) device->SourcesMax = 256;
|
if(device->SourcesMax == 0) device->SourcesMax = 256;
|
||||||
|
@ -766,7 +766,7 @@ ALCboolean ALCplaybackAlsa_reset(ALCplaybackAlsa *self)
|
|||||||
}
|
}
|
||||||
CHECK(snd_pcm_hw_params_set_format(self->pcmHandle, hp, format));
|
CHECK(snd_pcm_hw_params_set_format(self->pcmHandle, hp, format));
|
||||||
/* test and set channels (implicitly sets frame bits) */
|
/* test and set channels (implicitly sets frame bits) */
|
||||||
if(snd_pcm_hw_params_test_channels(self->pcmHandle, hp, ChannelsFromDevFmt(device->FmtChans, device->AmbiOrder)) < 0)
|
if(snd_pcm_hw_params_test_channels(self->pcmHandle, hp, ChannelsFromDevFmt(device->FmtChans, device->mAmbiOrder)) < 0)
|
||||||
{
|
{
|
||||||
static const enum DevFmtChannels channellist[] = {
|
static const enum DevFmtChannels channellist[] = {
|
||||||
DevFmtStereo,
|
DevFmtStereo,
|
||||||
@ -781,12 +781,12 @@ ALCboolean ALCplaybackAlsa_reset(ALCplaybackAlsa *self)
|
|||||||
if(snd_pcm_hw_params_test_channels(self->pcmHandle, hp, ChannelsFromDevFmt(chan, 0)) >= 0)
|
if(snd_pcm_hw_params_test_channels(self->pcmHandle, hp, ChannelsFromDevFmt(chan, 0)) >= 0)
|
||||||
{
|
{
|
||||||
device->FmtChans = chan;
|
device->FmtChans = chan;
|
||||||
device->AmbiOrder = 0;
|
device->mAmbiOrder = 0;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
CHECK(snd_pcm_hw_params_set_channels(self->pcmHandle, hp, ChannelsFromDevFmt(device->FmtChans, device->AmbiOrder)));
|
CHECK(snd_pcm_hw_params_set_channels(self->pcmHandle, hp, ChannelsFromDevFmt(device->FmtChans, device->mAmbiOrder)));
|
||||||
/* set rate (implicitly constrains period/buffer parameters) */
|
/* set rate (implicitly constrains period/buffer parameters) */
|
||||||
if(!GetConfigValueBool(device->DeviceName, "alsa", "allow-resampler", 0) ||
|
if(!GetConfigValueBool(device->DeviceName, "alsa", "allow-resampler", 0) ||
|
||||||
!(device->Flags&DEVICE_FREQUENCY_REQUEST))
|
!(device->Flags&DEVICE_FREQUENCY_REQUEST))
|
||||||
@ -1046,7 +1046,7 @@ ALCenum ALCcaptureAlsa_open(ALCcaptureAlsa *self, const ALCchar *name)
|
|||||||
/* set format (implicitly sets sample bits) */
|
/* set format (implicitly sets sample bits) */
|
||||||
CHECK(snd_pcm_hw_params_set_format(self->pcmHandle, hp, format));
|
CHECK(snd_pcm_hw_params_set_format(self->pcmHandle, hp, format));
|
||||||
/* set channels (implicitly sets frame bits) */
|
/* set channels (implicitly sets frame bits) */
|
||||||
CHECK(snd_pcm_hw_params_set_channels(self->pcmHandle, hp, ChannelsFromDevFmt(device->FmtChans, device->AmbiOrder)));
|
CHECK(snd_pcm_hw_params_set_channels(self->pcmHandle, hp, ChannelsFromDevFmt(device->FmtChans, device->mAmbiOrder)));
|
||||||
/* set rate (implicitly constrains period/buffer parameters) */
|
/* set rate (implicitly constrains period/buffer parameters) */
|
||||||
CHECK(snd_pcm_hw_params_set_rate(self->pcmHandle, hp, device->Frequency, 0));
|
CHECK(snd_pcm_hw_params_set_rate(self->pcmHandle, hp, device->Frequency, 0));
|
||||||
/* set buffer size in frame units (implicitly sets period size/bytes/time and buffer time/bytes) */
|
/* set buffer size in frame units (implicitly sets period size/bytes/time and buffer time/bytes) */
|
||||||
@ -1070,7 +1070,7 @@ ALCenum ALCcaptureAlsa_open(ALCcaptureAlsa *self, const ALCchar *name)
|
|||||||
{
|
{
|
||||||
self->ring = ll_ringbuffer_create(
|
self->ring = ll_ringbuffer_create(
|
||||||
device->UpdateSize*device->NumUpdates,
|
device->UpdateSize*device->NumUpdates,
|
||||||
FrameSizeFromDevFmt(device->FmtChans, device->FmtType, device->AmbiOrder),
|
FrameSizeFromDevFmt(device->FmtChans, device->FmtType, device->mAmbiOrder),
|
||||||
false
|
false
|
||||||
);
|
);
|
||||||
if(!self->ring)
|
if(!self->ring)
|
||||||
|
@ -272,7 +272,7 @@ static ALCboolean ALCcoreAudioPlayback_reset(ALCcoreAudioPlayback *self)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* setup callback */
|
/* setup callback */
|
||||||
self->frameSize = FrameSizeFromDevFmt(device->FmtChans, device->FmtType, device->AmbiOrder);
|
self->frameSize = FrameSizeFromDevFmt(device->FmtChans, device->FmtType, device->mAmbiOrder);
|
||||||
input.inputProc = ALCcoreAudioPlayback_MixerProc;
|
input.inputProc = ALCcoreAudioPlayback_MixerProc;
|
||||||
input.inputProcRefCon = self;
|
input.inputProcRefCon = self;
|
||||||
|
|
||||||
@ -624,7 +624,7 @@ static ALCenum ALCcoreAudioCapture_open(ALCcoreAudioCapture *self, const ALCchar
|
|||||||
|
|
||||||
// save requested format description for later use
|
// save requested format description for later use
|
||||||
self->format = requestedFormat;
|
self->format = requestedFormat;
|
||||||
self->frameSize = FrameSizeFromDevFmt(device->FmtChans, device->FmtType, device->AmbiOrder);
|
self->frameSize = FrameSizeFromDevFmt(device->FmtChans, device->FmtType, device->mAmbiOrder);
|
||||||
|
|
||||||
// Use intermediate format for sample rate conversion (outputFormat)
|
// Use intermediate format for sample rate conversion (outputFormat)
|
||||||
// Set sample rate to the same as hardware for resampling later
|
// Set sample rate to the same as hardware for resampling later
|
||||||
|
@ -265,7 +265,7 @@ FORCE_ALIGN int ALCdsoundPlayback_mixerProc(ALCdsoundPlayback *self)
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
ALsizei FrameSize{FrameSizeFromDevFmt(device->FmtChans, device->FmtType, device->AmbiOrder)};
|
ALsizei FrameSize{FrameSizeFromDevFmt(device->FmtChans, device->FmtType, device->mAmbiOrder)};
|
||||||
DWORD FragSize{device->UpdateSize * FrameSize};
|
DWORD FragSize{device->UpdateSize * FrameSize};
|
||||||
|
|
||||||
bool Playing{false};
|
bool Playing{false};
|
||||||
@ -523,7 +523,7 @@ ALCboolean ALCdsoundPlayback_reset(ALCdsoundPlayback *self)
|
|||||||
retry_open:
|
retry_open:
|
||||||
hr = S_OK;
|
hr = S_OK;
|
||||||
OutputType.Format.wFormatTag = WAVE_FORMAT_PCM;
|
OutputType.Format.wFormatTag = WAVE_FORMAT_PCM;
|
||||||
OutputType.Format.nChannels = ChannelsFromDevFmt(device->FmtChans, device->AmbiOrder);
|
OutputType.Format.nChannels = ChannelsFromDevFmt(device->FmtChans, device->mAmbiOrder);
|
||||||
OutputType.Format.wBitsPerSample = BytesFromDevFmt(device->FmtType) * 8;
|
OutputType.Format.wBitsPerSample = BytesFromDevFmt(device->FmtType) * 8;
|
||||||
OutputType.Format.nBlockAlign = OutputType.Format.nChannels*OutputType.Format.wBitsPerSample/8;
|
OutputType.Format.nBlockAlign = OutputType.Format.nChannels*OutputType.Format.wBitsPerSample/8;
|
||||||
OutputType.Format.nSamplesPerSec = device->Frequency;
|
OutputType.Format.nSamplesPerSec = device->Frequency;
|
||||||
@ -807,7 +807,7 @@ ALCenum ALCdsoundCapture_open(ALCdsoundCapture *self, const ALCchar *deviceName)
|
|||||||
}
|
}
|
||||||
|
|
||||||
InputType.Format.wFormatTag = WAVE_FORMAT_PCM;
|
InputType.Format.wFormatTag = WAVE_FORMAT_PCM;
|
||||||
InputType.Format.nChannels = ChannelsFromDevFmt(device->FmtChans, device->AmbiOrder);
|
InputType.Format.nChannels = ChannelsFromDevFmt(device->FmtChans, device->mAmbiOrder);
|
||||||
InputType.Format.wBitsPerSample = BytesFromDevFmt(device->FmtType) * 8;
|
InputType.Format.wBitsPerSample = BytesFromDevFmt(device->FmtType) * 8;
|
||||||
InputType.Format.nBlockAlign = InputType.Format.nChannels*InputType.Format.wBitsPerSample/8;
|
InputType.Format.nBlockAlign = InputType.Format.nChannels*InputType.Format.wBitsPerSample/8;
|
||||||
InputType.Format.nSamplesPerSec = device->Frequency;
|
InputType.Format.nSamplesPerSec = device->Frequency;
|
||||||
@ -908,7 +908,7 @@ ALCuint ALCdsoundCapture_availableSamples(ALCdsoundCapture *self)
|
|||||||
if(!ATOMIC_LOAD(&device->Connected, almemory_order_acquire))
|
if(!ATOMIC_LOAD(&device->Connected, almemory_order_acquire))
|
||||||
return ll_ringbuffer_read_space(self->Ring);
|
return ll_ringbuffer_read_space(self->Ring);
|
||||||
|
|
||||||
ALsizei FrameSize{FrameSizeFromDevFmt(device->FmtChans, device->FmtType, device->AmbiOrder)};
|
ALsizei FrameSize{FrameSizeFromDevFmt(device->FmtChans, device->FmtType, device->mAmbiOrder)};
|
||||||
DWORD BufferBytes{self->BufferBytes};
|
DWORD BufferBytes{self->BufferBytes};
|
||||||
DWORD LastCursor{self->Cursor};
|
DWORD LastCursor{self->Cursor};
|
||||||
|
|
||||||
|
@ -232,7 +232,7 @@ static int ALCjackPlayback_bufferSizeNotify(jack_nframes_t numframes, void *arg)
|
|||||||
|
|
||||||
ll_ringbuffer_free(self->Ring);
|
ll_ringbuffer_free(self->Ring);
|
||||||
self->Ring = ll_ringbuffer_create(bufsize,
|
self->Ring = ll_ringbuffer_create(bufsize,
|
||||||
FrameSizeFromDevFmt(device->FmtChans, device->FmtType, device->AmbiOrder),
|
FrameSizeFromDevFmt(device->FmtChans, device->FmtType, device->mAmbiOrder),
|
||||||
true
|
true
|
||||||
);
|
);
|
||||||
if(!self->Ring)
|
if(!self->Ring)
|
||||||
@ -402,7 +402,7 @@ static ALCboolean ALCjackPlayback_reset(ALCjackPlayback *self)
|
|||||||
/* Force 32-bit float output. */
|
/* Force 32-bit float output. */
|
||||||
device->FmtType = DevFmtFloat;
|
device->FmtType = DevFmtFloat;
|
||||||
|
|
||||||
numchans = ChannelsFromDevFmt(device->FmtChans, device->AmbiOrder);
|
numchans = ChannelsFromDevFmt(device->FmtChans, device->mAmbiOrder);
|
||||||
for(i = 0;i < numchans;i++)
|
for(i = 0;i < numchans;i++)
|
||||||
{
|
{
|
||||||
char name[64];
|
char name[64];
|
||||||
@ -432,7 +432,7 @@ static ALCboolean ALCjackPlayback_reset(ALCjackPlayback *self)
|
|||||||
|
|
||||||
ll_ringbuffer_free(self->Ring);
|
ll_ringbuffer_free(self->Ring);
|
||||||
self->Ring = ll_ringbuffer_create(bufsize,
|
self->Ring = ll_ringbuffer_create(bufsize,
|
||||||
FrameSizeFromDevFmt(device->FmtChans, device->FmtType, device->AmbiOrder),
|
FrameSizeFromDevFmt(device->FmtChans, device->FmtType, device->mAmbiOrder),
|
||||||
true
|
true
|
||||||
);
|
);
|
||||||
if(!self->Ring)
|
if(!self->Ring)
|
||||||
|
@ -481,7 +481,7 @@ static ALCboolean ALCopenslPlayback_reset(ALCopenslPlayback *self)
|
|||||||
device->FmtType = DevFmtShort;
|
device->FmtType = DevFmtShort;
|
||||||
|
|
||||||
SetDefaultWFXChannelOrder(device);
|
SetDefaultWFXChannelOrder(device);
|
||||||
self->mFrameSize = FrameSizeFromDevFmt(device->FmtChans, device->FmtType, device->AmbiOrder);
|
self->mFrameSize = FrameSizeFromDevFmt(device->FmtChans, device->FmtType, device->mAmbiOrder);
|
||||||
|
|
||||||
|
|
||||||
loc_bufq.locatorType = SL_DATALOCATOR_ANDROIDSIMPLEBUFFERQUEUE;
|
loc_bufq.locatorType = SL_DATALOCATOR_ANDROIDSIMPLEBUFFERQUEUE;
|
||||||
@ -490,7 +490,7 @@ static ALCboolean ALCopenslPlayback_reset(ALCopenslPlayback *self)
|
|||||||
#ifdef SL_DATAFORMAT_PCM_EX
|
#ifdef SL_DATAFORMAT_PCM_EX
|
||||||
SLDataFormat_PCM_EX format_pcm;
|
SLDataFormat_PCM_EX format_pcm;
|
||||||
format_pcm.formatType = SL_DATAFORMAT_PCM_EX;
|
format_pcm.formatType = SL_DATAFORMAT_PCM_EX;
|
||||||
format_pcm.numChannels = ChannelsFromDevFmt(device->FmtChans, device->AmbiOrder);
|
format_pcm.numChannels = ChannelsFromDevFmt(device->FmtChans, device->mAmbiOrder);
|
||||||
format_pcm.sampleRate = device->Frequency * 1000;
|
format_pcm.sampleRate = device->Frequency * 1000;
|
||||||
format_pcm.bitsPerSample = BytesFromDevFmt(device->FmtType) * 8;
|
format_pcm.bitsPerSample = BytesFromDevFmt(device->FmtType) * 8;
|
||||||
format_pcm.containerSize = format_pcm.bitsPerSample;
|
format_pcm.containerSize = format_pcm.bitsPerSample;
|
||||||
@ -501,7 +501,7 @@ static ALCboolean ALCopenslPlayback_reset(ALCopenslPlayback *self)
|
|||||||
#else
|
#else
|
||||||
SLDataFormat_PCM format_pcm;
|
SLDataFormat_PCM format_pcm;
|
||||||
format_pcm.formatType = SL_DATAFORMAT_PCM;
|
format_pcm.formatType = SL_DATAFORMAT_PCM;
|
||||||
format_pcm.numChannels = ChannelsFromDevFmt(device->FmtChans, device->AmbiOrder);
|
format_pcm.numChannels = ChannelsFromDevFmt(device->FmtChans, device->mAmbiOrder);
|
||||||
format_pcm.samplesPerSec = device->Frequency * 1000;
|
format_pcm.samplesPerSec = device->Frequency * 1000;
|
||||||
format_pcm.bitsPerSample = BytesFromDevFmt(device->FmtType) * 8;
|
format_pcm.bitsPerSample = BytesFromDevFmt(device->FmtType) * 8;
|
||||||
format_pcm.containerSize = format_pcm.bitsPerSample;
|
format_pcm.containerSize = format_pcm.bitsPerSample;
|
||||||
@ -780,7 +780,7 @@ static ALCenum ALCopenslCapture_open(ALCopenslCapture *self, const ALCchar *name
|
|||||||
device->UpdateSize = update_len;
|
device->UpdateSize = update_len;
|
||||||
device->NumUpdates = (length+update_len-1) / update_len;
|
device->NumUpdates = (length+update_len-1) / update_len;
|
||||||
|
|
||||||
self->mFrameSize = FrameSizeFromDevFmt(device->FmtChans, device->FmtType, device->AmbiOrder);
|
self->mFrameSize = FrameSizeFromDevFmt(device->FmtChans, device->FmtType, device->mAmbiOrder);
|
||||||
}
|
}
|
||||||
loc_dev.locatorType = SL_DATALOCATOR_IODEVICE;
|
loc_dev.locatorType = SL_DATALOCATOR_IODEVICE;
|
||||||
loc_dev.deviceType = SL_IODEVICE_AUDIOINPUT;
|
loc_dev.deviceType = SL_IODEVICE_AUDIOINPUT;
|
||||||
@ -796,7 +796,7 @@ static ALCenum ALCopenslCapture_open(ALCopenslCapture *self, const ALCchar *name
|
|||||||
#ifdef SL_DATAFORMAT_PCM_EX
|
#ifdef SL_DATAFORMAT_PCM_EX
|
||||||
SLDataFormat_PCM_EX format_pcm;
|
SLDataFormat_PCM_EX format_pcm;
|
||||||
format_pcm.formatType = SL_DATAFORMAT_PCM_EX;
|
format_pcm.formatType = SL_DATAFORMAT_PCM_EX;
|
||||||
format_pcm.numChannels = ChannelsFromDevFmt(device->FmtChans, device->AmbiOrder);
|
format_pcm.numChannels = ChannelsFromDevFmt(device->FmtChans, device->mAmbiOrder);
|
||||||
format_pcm.sampleRate = device->Frequency * 1000;
|
format_pcm.sampleRate = device->Frequency * 1000;
|
||||||
format_pcm.bitsPerSample = BytesFromDevFmt(device->FmtType) * 8;
|
format_pcm.bitsPerSample = BytesFromDevFmt(device->FmtType) * 8;
|
||||||
format_pcm.containerSize = format_pcm.bitsPerSample;
|
format_pcm.containerSize = format_pcm.bitsPerSample;
|
||||||
@ -807,7 +807,7 @@ static ALCenum ALCopenslCapture_open(ALCopenslCapture *self, const ALCchar *name
|
|||||||
#else
|
#else
|
||||||
SLDataFormat_PCM format_pcm;
|
SLDataFormat_PCM format_pcm;
|
||||||
format_pcm.formatType = SL_DATAFORMAT_PCM;
|
format_pcm.formatType = SL_DATAFORMAT_PCM;
|
||||||
format_pcm.numChannels = ChannelsFromDevFmt(device->FmtChans, device->AmbiOrder);
|
format_pcm.numChannels = ChannelsFromDevFmt(device->FmtChans, device->mAmbiOrder);
|
||||||
format_pcm.samplesPerSec = device->Frequency * 1000;
|
format_pcm.samplesPerSec = device->Frequency * 1000;
|
||||||
format_pcm.bitsPerSample = BytesFromDevFmt(device->FmtType) * 8;
|
format_pcm.bitsPerSample = BytesFromDevFmt(device->FmtType) * 8;
|
||||||
format_pcm.containerSize = format_pcm.bitsPerSample;
|
format_pcm.containerSize = format_pcm.bitsPerSample;
|
||||||
|
@ -298,7 +298,7 @@ int ALCplaybackOSS_mixerProc(ALCplaybackOSS *self)
|
|||||||
SetRTPriority();
|
SetRTPriority();
|
||||||
althrd_setname(MIXER_THREAD_NAME);
|
althrd_setname(MIXER_THREAD_NAME);
|
||||||
|
|
||||||
frame_size = FrameSizeFromDevFmt(device->FmtChans, device->FmtType, device->AmbiOrder);
|
frame_size = FrameSizeFromDevFmt(device->FmtChans, device->FmtType, device->mAmbiOrder);
|
||||||
|
|
||||||
ALCplaybackOSS_lock(self);
|
ALCplaybackOSS_lock(self);
|
||||||
while(!self->killNow.load(std::memory_order_acquire) &&
|
while(!self->killNow.load(std::memory_order_acquire) &&
|
||||||
@ -419,7 +419,7 @@ ALCboolean ALCplaybackOSS_reset(ALCplaybackOSS *self)
|
|||||||
}
|
}
|
||||||
|
|
||||||
periods = device->NumUpdates;
|
periods = device->NumUpdates;
|
||||||
numChannels = ChannelsFromDevFmt(device->FmtChans, device->AmbiOrder);
|
numChannels = ChannelsFromDevFmt(device->FmtChans, device->mAmbiOrder);
|
||||||
ossSpeed = device->Frequency;
|
ossSpeed = device->Frequency;
|
||||||
frameSize = numChannels * BytesFromDevFmt(device->FmtType);
|
frameSize = numChannels * BytesFromDevFmt(device->FmtType);
|
||||||
/* According to the OSS spec, 16 bytes (log2(16)) is the minimum. */
|
/* According to the OSS spec, 16 bytes (log2(16)) is the minimum. */
|
||||||
@ -445,7 +445,7 @@ ALCboolean ALCplaybackOSS_reset(ALCplaybackOSS *self)
|
|||||||
}
|
}
|
||||||
#undef CHECKERR
|
#undef CHECKERR
|
||||||
|
|
||||||
if((int)ChannelsFromDevFmt(device->FmtChans, device->AmbiOrder) != numChannels)
|
if((int)ChannelsFromDevFmt(device->FmtChans, device->mAmbiOrder) != numChannels)
|
||||||
{
|
{
|
||||||
ERR("Failed to set %s, got %d channels instead\n", DevFmtChannelsString(device->FmtChans), numChannels);
|
ERR("Failed to set %s, got %d channels instead\n", DevFmtChannelsString(device->FmtChans), numChannels);
|
||||||
return ALC_FALSE;
|
return ALC_FALSE;
|
||||||
@ -474,7 +474,7 @@ ALCboolean ALCplaybackOSS_start(ALCplaybackOSS *self)
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
self->mix_data.resize(device->UpdateSize * FrameSizeFromDevFmt(
|
self->mix_data.resize(device->UpdateSize * FrameSizeFromDevFmt(
|
||||||
device->FmtChans, device->FmtType, device->AmbiOrder
|
device->FmtChans, device->FmtType, device->mAmbiOrder
|
||||||
));
|
));
|
||||||
|
|
||||||
self->killNow.store(AL_FALSE);
|
self->killNow.store(AL_FALSE);
|
||||||
@ -560,7 +560,7 @@ int ALCcaptureOSS_recordProc(ALCcaptureOSS *self)
|
|||||||
SetRTPriority();
|
SetRTPriority();
|
||||||
althrd_setname(RECORD_THREAD_NAME);
|
althrd_setname(RECORD_THREAD_NAME);
|
||||||
|
|
||||||
frame_size = FrameSizeFromDevFmt(device->FmtChans, device->FmtType, device->AmbiOrder);
|
frame_size = FrameSizeFromDevFmt(device->FmtChans, device->FmtType, device->mAmbiOrder);
|
||||||
|
|
||||||
while(!self->killNow.load())
|
while(!self->killNow.load())
|
||||||
{
|
{
|
||||||
@ -654,7 +654,7 @@ ALCenum ALCcaptureOSS_open(ALCcaptureOSS *self, const ALCchar *name)
|
|||||||
}
|
}
|
||||||
|
|
||||||
int periods{4};
|
int periods{4};
|
||||||
int numChannels{ChannelsFromDevFmt(device->FmtChans, device->AmbiOrder)};
|
int numChannels{ChannelsFromDevFmt(device->FmtChans, device->mAmbiOrder)};
|
||||||
int frameSize{numChannels * BytesFromDevFmt(device->FmtType)};
|
int frameSize{numChannels * BytesFromDevFmt(device->FmtType)};
|
||||||
int ossSpeed{static_cast<int>(device->Frequency)};
|
int ossSpeed{static_cast<int>(device->Frequency)};
|
||||||
int log2FragmentSize{log2i(device->UpdateSize * device->NumUpdates *
|
int log2FragmentSize{log2i(device->UpdateSize * device->NumUpdates *
|
||||||
@ -685,7 +685,7 @@ ALCenum ALCcaptureOSS_open(ALCcaptureOSS *self, const ALCchar *name)
|
|||||||
}
|
}
|
||||||
#undef CHECKERR
|
#undef CHECKERR
|
||||||
|
|
||||||
if((int)ChannelsFromDevFmt(device->FmtChans, device->AmbiOrder) != numChannels)
|
if((int)ChannelsFromDevFmt(device->FmtChans, device->mAmbiOrder) != numChannels)
|
||||||
{
|
{
|
||||||
ERR("Failed to set %s, got %d channels instead\n", DevFmtChannelsString(device->FmtChans), numChannels);
|
ERR("Failed to set %s, got %d channels instead\n", DevFmtChannelsString(device->FmtChans), numChannels);
|
||||||
close(self->fd);
|
close(self->fd);
|
||||||
|
@ -397,7 +397,7 @@ ALCenum ALCportCapture_open(ALCportCapture *self, const ALCchar *name)
|
|||||||
|
|
||||||
samples = device->UpdateSize * device->NumUpdates;
|
samples = device->UpdateSize * device->NumUpdates;
|
||||||
samples = maxu(samples, 100 * device->Frequency / 1000);
|
samples = maxu(samples, 100 * device->Frequency / 1000);
|
||||||
frame_size = FrameSizeFromDevFmt(device->FmtChans, device->FmtType, device->AmbiOrder);
|
frame_size = FrameSizeFromDevFmt(device->FmtChans, device->FmtType, device->mAmbiOrder);
|
||||||
|
|
||||||
self->ring = ll_ringbuffer_create(samples, frame_size, false);
|
self->ring = ll_ringbuffer_create(samples, frame_size, false);
|
||||||
if(self->ring == nullptr) return ALC_INVALID_VALUE;
|
if(self->ring == nullptr) return ALC_INVALID_VALUE;
|
||||||
@ -431,7 +431,7 @@ ALCenum ALCportCapture_open(ALCportCapture *self, const ALCchar *name)
|
|||||||
ERR("%s samples not supported\n", DevFmtTypeString(device->FmtType));
|
ERR("%s samples not supported\n", DevFmtTypeString(device->FmtType));
|
||||||
return ALC_INVALID_VALUE;
|
return ALC_INVALID_VALUE;
|
||||||
}
|
}
|
||||||
self->params.channelCount = ChannelsFromDevFmt(device->FmtChans, device->AmbiOrder);
|
self->params.channelCount = ChannelsFromDevFmt(device->FmtChans, device->mAmbiOrder);
|
||||||
|
|
||||||
err = Pa_OpenStream(&self->stream, &self->params, nullptr,
|
err = Pa_OpenStream(&self->stream, &self->params, nullptr,
|
||||||
device->Frequency, paFramesPerBufferUnspecified, paNoFlag,
|
device->Frequency, paFramesPerBufferUnspecified, paNoFlag,
|
||||||
|
@ -1040,7 +1040,7 @@ ALCboolean PulsePlayback_reset(PulsePlayback *self)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
self->spec.rate = device->Frequency;
|
self->spec.rate = device->Frequency;
|
||||||
self->spec.channels = ChannelsFromDevFmt(device->FmtChans, device->AmbiOrder);
|
self->spec.channels = ChannelsFromDevFmt(device->FmtChans, device->mAmbiOrder);
|
||||||
|
|
||||||
if(pa_sample_spec_valid(&self->spec) == 0)
|
if(pa_sample_spec_valid(&self->spec) == 0)
|
||||||
{
|
{
|
||||||
@ -1557,7 +1557,7 @@ ALCenum PulseCapture_open(PulseCapture *self, const ALCchar *name)
|
|||||||
}
|
}
|
||||||
|
|
||||||
self->spec.rate = device->Frequency;
|
self->spec.rate = device->Frequency;
|
||||||
self->spec.channels = ChannelsFromDevFmt(device->FmtChans, device->AmbiOrder);
|
self->spec.channels = ChannelsFromDevFmt(device->FmtChans, device->mAmbiOrder);
|
||||||
|
|
||||||
if(pa_sample_spec_valid(&self->spec) == 0)
|
if(pa_sample_spec_valid(&self->spec) == 0)
|
||||||
{
|
{
|
||||||
|
@ -206,7 +206,7 @@ FORCE_ALIGN static int qsa_proc_playback(void *ptr)
|
|||||||
SchedSet(0, 0, SCHED_NOCHANGE, ¶m);
|
SchedSet(0, 0, SCHED_NOCHANGE, ¶m);
|
||||||
|
|
||||||
const ALint frame_size = FrameSizeFromDevFmt(
|
const ALint frame_size = FrameSizeFromDevFmt(
|
||||||
device->FmtChans, device->FmtType, device->AmbiOrder
|
device->FmtChans, device->FmtType, device->mAmbiOrder
|
||||||
);
|
);
|
||||||
|
|
||||||
PlaybackWrapper_lock(self);
|
PlaybackWrapper_lock(self);
|
||||||
@ -394,13 +394,13 @@ static ALCboolean qsa_reset_playback(PlaybackWrapper *self)
|
|||||||
data->cparams.stop_mode=SND_PCM_STOP_STOP;
|
data->cparams.stop_mode=SND_PCM_STOP_STOP;
|
||||||
|
|
||||||
data->cparams.buf.block.frag_size=device->UpdateSize *
|
data->cparams.buf.block.frag_size=device->UpdateSize *
|
||||||
FrameSizeFromDevFmt(device->FmtChans, device->FmtType, device->AmbiOrder);
|
FrameSizeFromDevFmt(device->FmtChans, device->FmtType, device->mAmbiOrder);
|
||||||
data->cparams.buf.block.frags_max=device->NumUpdates;
|
data->cparams.buf.block.frags_max=device->NumUpdates;
|
||||||
data->cparams.buf.block.frags_min=device->NumUpdates;
|
data->cparams.buf.block.frags_min=device->NumUpdates;
|
||||||
|
|
||||||
data->cparams.format.interleave=1;
|
data->cparams.format.interleave=1;
|
||||||
data->cparams.format.rate=device->Frequency;
|
data->cparams.format.rate=device->Frequency;
|
||||||
data->cparams.format.voices=ChannelsFromDevFmt(device->FmtChans, device->AmbiOrder);
|
data->cparams.format.voices=ChannelsFromDevFmt(device->FmtChans, device->mAmbiOrder);
|
||||||
data->cparams.format.format=format;
|
data->cparams.format.format=format;
|
||||||
|
|
||||||
if ((snd_pcm_plugin_params(data->pcmHandle, &data->cparams))<0)
|
if ((snd_pcm_plugin_params(data->pcmHandle, &data->cparams))<0)
|
||||||
@ -584,7 +584,7 @@ static ALCboolean qsa_reset_playback(PlaybackWrapper *self)
|
|||||||
SetDefaultChannelOrder(device);
|
SetDefaultChannelOrder(device);
|
||||||
|
|
||||||
device->UpdateSize=data->csetup.buf.block.frag_size/
|
device->UpdateSize=data->csetup.buf.block.frag_size/
|
||||||
FrameSizeFromDevFmt(device->FmtChans, device->FmtType, device->AmbiOrder);
|
FrameSizeFromDevFmt(device->FmtChans, device->FmtType, device->mAmbiOrder);
|
||||||
device->NumUpdates=data->csetup.buf.block.frags;
|
device->NumUpdates=data->csetup.buf.block.frags;
|
||||||
|
|
||||||
data->size=data->csetup.buf.block.frag_size;
|
data->size=data->csetup.buf.block.frag_size;
|
||||||
@ -776,13 +776,13 @@ static ALCenum qsa_open_capture(CaptureWrapper *self, const ALCchar *deviceName)
|
|||||||
data->cparams.stop_mode=SND_PCM_STOP_STOP;
|
data->cparams.stop_mode=SND_PCM_STOP_STOP;
|
||||||
|
|
||||||
data->cparams.buf.block.frag_size=device->UpdateSize*
|
data->cparams.buf.block.frag_size=device->UpdateSize*
|
||||||
FrameSizeFromDevFmt(device->FmtChans, device->FmtType, device->AmbiOrder);
|
FrameSizeFromDevFmt(device->FmtChans, device->FmtType, device->mAmbiOrder);
|
||||||
data->cparams.buf.block.frags_max=device->NumUpdates;
|
data->cparams.buf.block.frags_max=device->NumUpdates;
|
||||||
data->cparams.buf.block.frags_min=device->NumUpdates;
|
data->cparams.buf.block.frags_min=device->NumUpdates;
|
||||||
|
|
||||||
data->cparams.format.interleave=1;
|
data->cparams.format.interleave=1;
|
||||||
data->cparams.format.rate=device->Frequency;
|
data->cparams.format.rate=device->Frequency;
|
||||||
data->cparams.format.voices=ChannelsFromDevFmt(device->FmtChans, device->AmbiOrder);
|
data->cparams.format.voices=ChannelsFromDevFmt(device->FmtChans, device->mAmbiOrder);
|
||||||
data->cparams.format.format=format;
|
data->cparams.format.format=format;
|
||||||
|
|
||||||
if(snd_pcm_plugin_params(data->pcmHandle, &data->cparams) < 0)
|
if(snd_pcm_plugin_params(data->pcmHandle, &data->cparams) < 0)
|
||||||
@ -840,7 +840,7 @@ static ALCuint qsa_available_samples(CaptureWrapper *self)
|
|||||||
ALCdevice *device = STATIC_CAST(ALCbackend,self)->mDevice;
|
ALCdevice *device = STATIC_CAST(ALCbackend,self)->mDevice;
|
||||||
qsa_data *data = self->ExtraData;
|
qsa_data *data = self->ExtraData;
|
||||||
snd_pcm_channel_status_t status;
|
snd_pcm_channel_status_t status;
|
||||||
ALint frame_size = FrameSizeFromDevFmt(device->FmtChans, device->FmtType, device->AmbiOrder);
|
ALint frame_size = FrameSizeFromDevFmt(device->FmtChans, device->FmtType, device->mAmbiOrder);
|
||||||
ALint free_size;
|
ALint free_size;
|
||||||
int rstatus;
|
int rstatus;
|
||||||
|
|
||||||
@ -877,7 +877,7 @@ static ALCenum qsa_capture_samples(CaptureWrapper *self, ALCvoid *buffer, ALCuin
|
|||||||
int selectret;
|
int selectret;
|
||||||
struct timeval timeout;
|
struct timeval timeout;
|
||||||
int bytes_read;
|
int bytes_read;
|
||||||
ALint frame_size=FrameSizeFromDevFmt(device->FmtChans, device->FmtType, device->AmbiOrder);
|
ALint frame_size=FrameSizeFromDevFmt(device->FmtChans, device->FmtType, device->mAmbiOrder);
|
||||||
ALint len=samples*frame_size;
|
ALint len=samples*frame_size;
|
||||||
int rstatus;
|
int rstatus;
|
||||||
|
|
||||||
|
@ -73,7 +73,7 @@ static void ALCsdl2Backend_Construct(ALCsdl2Backend *self, ALCdevice *device)
|
|||||||
SET_VTABLE2(ALCsdl2Backend, ALCbackend, self);
|
SET_VTABLE2(ALCsdl2Backend, ALCbackend, self);
|
||||||
|
|
||||||
self->deviceID = 0;
|
self->deviceID = 0;
|
||||||
self->frameSize = FrameSizeFromDevFmt(device->FmtChans, device->FmtType, device->AmbiOrder);
|
self->frameSize = FrameSizeFromDevFmt(device->FmtChans, device->FmtType, device->mAmbiOrder);
|
||||||
self->Frequency = device->Frequency;
|
self->Frequency = device->Frequency;
|
||||||
self->FmtChans = device->FmtChans;
|
self->FmtChans = device->FmtChans;
|
||||||
self->FmtType = device->FmtType;
|
self->FmtType = device->FmtType;
|
||||||
@ -168,7 +168,7 @@ static ALCenum ALCsdl2Backend_open(ALCsdl2Backend *self, const ALCchar *name)
|
|||||||
device->UpdateSize = have.samples;
|
device->UpdateSize = have.samples;
|
||||||
device->NumUpdates = 2; /* SDL always (tries to) use two periods. */
|
device->NumUpdates = 2; /* SDL always (tries to) use two periods. */
|
||||||
|
|
||||||
self->frameSize = FrameSizeFromDevFmt(device->FmtChans, device->FmtType, device->AmbiOrder);
|
self->frameSize = FrameSizeFromDevFmt(device->FmtChans, device->FmtType, device->mAmbiOrder);
|
||||||
self->Frequency = device->Frequency;
|
self->Frequency = device->Frequency;
|
||||||
self->FmtChans = device->FmtChans;
|
self->FmtChans = device->FmtChans;
|
||||||
self->FmtType = device->FmtType;
|
self->FmtType = device->FmtType;
|
||||||
|
@ -100,7 +100,7 @@ static int SndioPlayback_mixerProc(void *ptr)
|
|||||||
SetRTPriority();
|
SetRTPriority();
|
||||||
althrd_setname(MIXER_THREAD_NAME);
|
althrd_setname(MIXER_THREAD_NAME);
|
||||||
|
|
||||||
frameSize = FrameSizeFromDevFmt(device->FmtChans, device->FmtType, device->AmbiOrder);
|
frameSize = FrameSizeFromDevFmt(device->FmtChans, device->FmtType, device->mAmbiOrder);
|
||||||
|
|
||||||
while(!ATOMIC_LOAD(&self->killNow, almemory_order_acquire) &&
|
while(!ATOMIC_LOAD(&self->killNow, almemory_order_acquire) &&
|
||||||
ATOMIC_LOAD(&device->Connected, almemory_order_acquire))
|
ATOMIC_LOAD(&device->Connected, almemory_order_acquire))
|
||||||
@ -244,7 +244,7 @@ static ALCboolean SndioPlayback_start(SndioPlayback *self)
|
|||||||
ALCdevice *device = STATIC_CAST(ALCbackend,self)->mDevice;
|
ALCdevice *device = STATIC_CAST(ALCbackend,self)->mDevice;
|
||||||
|
|
||||||
self->data_size = device->UpdateSize * FrameSizeFromDevFmt(
|
self->data_size = device->UpdateSize * FrameSizeFromDevFmt(
|
||||||
device->FmtChans, device->FmtType, device->AmbiOrder
|
device->FmtChans, device->FmtType, device->mAmbiOrder
|
||||||
);
|
);
|
||||||
al_free(self->mix_data);
|
al_free(self->mix_data);
|
||||||
self->mix_data = al_calloc(16, self->data_size);
|
self->mix_data = al_calloc(16, self->data_size);
|
||||||
@ -342,7 +342,7 @@ static int SndioCapture_recordProc(void* ptr)
|
|||||||
SetRTPriority();
|
SetRTPriority();
|
||||||
althrd_setname(RECORD_THREAD_NAME);
|
althrd_setname(RECORD_THREAD_NAME);
|
||||||
|
|
||||||
frameSize = FrameSizeFromDevFmt(device->FmtChans, device->FmtType, device->AmbiOrder);
|
frameSize = FrameSizeFromDevFmt(device->FmtChans, device->FmtType, device->mAmbiOrder);
|
||||||
|
|
||||||
while(!ATOMIC_LOAD(&self->killNow, almemory_order_acquire) &&
|
while(!ATOMIC_LOAD(&self->killNow, almemory_order_acquire) &&
|
||||||
ATOMIC_LOAD(&device->Connected, almemory_order_acquire))
|
ATOMIC_LOAD(&device->Connected, almemory_order_acquire))
|
||||||
@ -442,7 +442,7 @@ static ALCenum SndioCapture_open(SndioCapture *self, const ALCchar *name)
|
|||||||
par.bits = par.bps * 8;
|
par.bits = par.bps * 8;
|
||||||
par.le = SIO_LE_NATIVE;
|
par.le = SIO_LE_NATIVE;
|
||||||
par.msb = SIO_LE_NATIVE ? 0 : 1;
|
par.msb = SIO_LE_NATIVE ? 0 : 1;
|
||||||
par.rchan = ChannelsFromDevFmt(device->FmtChans, device->AmbiOrder);
|
par.rchan = ChannelsFromDevFmt(device->FmtChans, device->mAmbiOrder);
|
||||||
par.rate = device->Frequency;
|
par.rate = device->Frequency;
|
||||||
|
|
||||||
par.appbufsz = maxu(device->UpdateSize*device->NumUpdates, (device->Frequency+9)/10);
|
par.appbufsz = maxu(device->UpdateSize*device->NumUpdates, (device->Frequency+9)/10);
|
||||||
@ -470,7 +470,7 @@ static ALCenum SndioCapture_open(SndioCapture *self, const ALCchar *name)
|
|||||||
(device->FmtType == DevFmtUShort && par.bits == 16 && par.sig == 0) ||
|
(device->FmtType == DevFmtUShort && par.bits == 16 && par.sig == 0) ||
|
||||||
(device->FmtType == DevFmtInt && par.bits == 32 && par.sig != 0) ||
|
(device->FmtType == DevFmtInt && par.bits == 32 && par.sig != 0) ||
|
||||||
(device->FmtType == DevFmtUInt && par.bits == 32 && par.sig == 0)) ||
|
(device->FmtType == DevFmtUInt && par.bits == 32 && par.sig == 0)) ||
|
||||||
ChannelsFromDevFmt(device->FmtChans, device->AmbiOrder) != (ALsizei)par.rchan ||
|
ChannelsFromDevFmt(device->FmtChans, device->mAmbiOrder) != (ALsizei)par.rchan ||
|
||||||
device->Frequency != par.rate)
|
device->Frequency != par.rate)
|
||||||
{
|
{
|
||||||
ERR("Failed to set format %s %s %uhz, got %c%u %u-channel %uhz instead\n",
|
ERR("Failed to set format %s %s %uhz, got %c%u %u-channel %uhz instead\n",
|
||||||
|
@ -117,7 +117,7 @@ static int ALCsolarisBackend_mixerProc(void *ptr)
|
|||||||
SetRTPriority();
|
SetRTPriority();
|
||||||
althrd_setname(MIXER_THREAD_NAME);
|
althrd_setname(MIXER_THREAD_NAME);
|
||||||
|
|
||||||
frame_size = FrameSizeFromDevFmt(device->FmtChans, device->FmtType, device->AmbiOrder);
|
frame_size = FrameSizeFromDevFmt(device->FmtChans, device->FmtType, device->mAmbiOrder);
|
||||||
|
|
||||||
ALCsolarisBackend_lock(self);
|
ALCsolarisBackend_lock(self);
|
||||||
while(!ATOMIC_LOAD(&self->killNow, almemory_order_acquire) &&
|
while(!ATOMIC_LOAD(&self->killNow, almemory_order_acquire) &&
|
||||||
@ -207,7 +207,7 @@ static ALCboolean ALCsolarisBackend_reset(ALCsolarisBackend *self)
|
|||||||
|
|
||||||
if(device->FmtChans != DevFmtMono)
|
if(device->FmtChans != DevFmtMono)
|
||||||
device->FmtChans = DevFmtStereo;
|
device->FmtChans = DevFmtStereo;
|
||||||
numChannels = ChannelsFromDevFmt(device->FmtChans, device->AmbiOrder);
|
numChannels = ChannelsFromDevFmt(device->FmtChans, device->mAmbiOrder);
|
||||||
info.play.channels = numChannels;
|
info.play.channels = numChannels;
|
||||||
|
|
||||||
switch(device->FmtType)
|
switch(device->FmtType)
|
||||||
@ -241,7 +241,7 @@ static ALCboolean ALCsolarisBackend_reset(ALCsolarisBackend *self)
|
|||||||
return ALC_FALSE;
|
return ALC_FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(ChannelsFromDevFmt(device->FmtChans, device->AmbiOrder) != (ALsizei)info.play.channels)
|
if(ChannelsFromDevFmt(device->FmtChans, device->mAmbiOrder) != (ALsizei)info.play.channels)
|
||||||
{
|
{
|
||||||
ERR("Failed to set %s, got %u channels instead\n", DevFmtChannelsString(device->FmtChans), info.play.channels);
|
ERR("Failed to set %s, got %u channels instead\n", DevFmtChannelsString(device->FmtChans), info.play.channels);
|
||||||
return ALC_FALSE;
|
return ALC_FALSE;
|
||||||
@ -264,7 +264,7 @@ static ALCboolean ALCsolarisBackend_reset(ALCsolarisBackend *self)
|
|||||||
|
|
||||||
free(self->mix_data);
|
free(self->mix_data);
|
||||||
self->data_size = device->UpdateSize * FrameSizeFromDevFmt(
|
self->data_size = device->UpdateSize * FrameSizeFromDevFmt(
|
||||||
device->FmtChans, device->FmtType, device->AmbiOrder
|
device->FmtChans, device->FmtType, device->mAmbiOrder
|
||||||
);
|
);
|
||||||
self->mix_data = static_cast<ALubyte*>(calloc(1, self->data_size));
|
self->mix_data = static_cast<ALubyte*>(calloc(1, self->data_size));
|
||||||
|
|
||||||
|
@ -1306,7 +1306,7 @@ FORCE_ALIGN int ALCwasapiCapture_recordProc(ALCwasapiCapture *self)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
ALuint framesize = FrameSizeFromDevFmt(device->FmtChans, device->FmtType,
|
ALuint framesize = FrameSizeFromDevFmt(device->FmtChans, device->FmtType,
|
||||||
device->AmbiOrder);
|
device->mAmbiOrder);
|
||||||
size_t len1 = minz(data[0].len, numsamples);
|
size_t len1 = minz(data[0].len, numsamples);
|
||||||
size_t len2 = minz(data[1].len, numsamples-len1);
|
size_t len2 = minz(data[1].len, numsamples-len1);
|
||||||
|
|
||||||
@ -1674,7 +1674,7 @@ HRESULT ALCwasapiCapture::resetProxy()
|
|||||||
if(device->Frequency != OutputType.Format.nSamplesPerSec || device->FmtType != srcType)
|
if(device->Frequency != OutputType.Format.nSamplesPerSec || device->FmtType != srcType)
|
||||||
{
|
{
|
||||||
mSampleConv = CreateSampleConverter(
|
mSampleConv = CreateSampleConverter(
|
||||||
srcType, device->FmtType, ChannelsFromDevFmt(device->FmtChans, device->AmbiOrder),
|
srcType, device->FmtType, ChannelsFromDevFmt(device->FmtChans, device->mAmbiOrder),
|
||||||
OutputType.Format.nSamplesPerSec, device->Frequency
|
OutputType.Format.nSamplesPerSec, device->Frequency
|
||||||
);
|
);
|
||||||
if(!mSampleConv)
|
if(!mSampleConv)
|
||||||
@ -1708,7 +1708,7 @@ HRESULT ALCwasapiCapture::resetProxy()
|
|||||||
buffer_len = maxu(device->UpdateSize*device->NumUpdates, buffer_len);
|
buffer_len = maxu(device->UpdateSize*device->NumUpdates, buffer_len);
|
||||||
ll_ringbuffer_free(mRing);
|
ll_ringbuffer_free(mRing);
|
||||||
mRing = ll_ringbuffer_create(buffer_len,
|
mRing = ll_ringbuffer_create(buffer_len,
|
||||||
FrameSizeFromDevFmt(device->FmtChans, device->FmtType, device->AmbiOrder),
|
FrameSizeFromDevFmt(device->FmtChans, device->FmtType, device->mAmbiOrder),
|
||||||
false
|
false
|
||||||
);
|
);
|
||||||
if(!mRing)
|
if(!mRing)
|
||||||
|
@ -135,7 +135,7 @@ int ALCwaveBackend_mixerProc(ALCwaveBackend *self)
|
|||||||
|
|
||||||
althrd_setname(MIXER_THREAD_NAME);
|
althrd_setname(MIXER_THREAD_NAME);
|
||||||
|
|
||||||
ALsizei frameSize{FrameSizeFromDevFmt(device->FmtChans, device->FmtType, device->AmbiOrder)};
|
ALsizei frameSize{FrameSizeFromDevFmt(device->FmtChans, device->FmtType, device->mAmbiOrder)};
|
||||||
|
|
||||||
ALint64 done{0};
|
ALint64 done{0};
|
||||||
auto start = std::chrono::steady_clock::now();
|
auto start = std::chrono::steady_clock::now();
|
||||||
@ -259,7 +259,7 @@ ALCboolean ALCwaveBackend_reset(ALCwaveBackend *self)
|
|||||||
if(GetConfigValueBool(nullptr, "wave", "bformat", 0))
|
if(GetConfigValueBool(nullptr, "wave", "bformat", 0))
|
||||||
{
|
{
|
||||||
device->FmtChans = DevFmtAmbi3D;
|
device->FmtChans = DevFmtAmbi3D;
|
||||||
device->AmbiOrder = 1;
|
device->mAmbiOrder = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
switch(device->FmtType)
|
switch(device->FmtType)
|
||||||
@ -290,14 +290,14 @@ ALCboolean ALCwaveBackend_reset(ALCwaveBackend *self)
|
|||||||
case DevFmtX71: chanmask = 0x01 | 0x02 | 0x04 | 0x08 | 0x010 | 0x020 | 0x200 | 0x400; break;
|
case DevFmtX71: chanmask = 0x01 | 0x02 | 0x04 | 0x08 | 0x010 | 0x020 | 0x200 | 0x400; break;
|
||||||
case DevFmtAmbi3D:
|
case DevFmtAmbi3D:
|
||||||
/* .amb output requires FuMa */
|
/* .amb output requires FuMa */
|
||||||
device->AmbiLayout = AmbiLayout_FuMa;
|
device->mAmbiLayout = AmbiLayout_FuMa;
|
||||||
device->AmbiScale = AmbiNorm_FuMa;
|
device->mAmbiScale = AmbiNorm_FuMa;
|
||||||
isbformat = 1;
|
isbformat = 1;
|
||||||
chanmask = 0;
|
chanmask = 0;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
bits = BytesFromDevFmt(device->FmtType) * 8;
|
bits = BytesFromDevFmt(device->FmtType) * 8;
|
||||||
channels = ChannelsFromDevFmt(device->FmtChans, device->AmbiOrder);
|
channels = ChannelsFromDevFmt(device->FmtChans, device->mAmbiOrder);
|
||||||
|
|
||||||
fputs("RIFF", self->mFile);
|
fputs("RIFF", self->mFile);
|
||||||
fwrite32le(0xFFFFFFFF, self->mFile); // 'RIFF' header len; filled in at close
|
fwrite32le(0xFFFFFFFF, self->mFile); // 'RIFF' header len; filled in at close
|
||||||
@ -344,7 +344,7 @@ ALCboolean ALCwaveBackend_reset(ALCwaveBackend *self)
|
|||||||
SetDefaultWFXChannelOrder(device);
|
SetDefaultWFXChannelOrder(device);
|
||||||
|
|
||||||
ALuint bufsize{FrameSizeFromDevFmt(
|
ALuint bufsize{FrameSizeFromDevFmt(
|
||||||
device->FmtChans, device->FmtType, device->AmbiOrder
|
device->FmtChans, device->FmtType, device->mAmbiOrder
|
||||||
) * device->UpdateSize};
|
) * device->UpdateSize};
|
||||||
self->mBuffer.resize(bufsize);
|
self->mBuffer.resize(bufsize);
|
||||||
|
|
||||||
|
@ -341,7 +341,7 @@ ALCboolean ALCwinmmPlayback_reset(ALCwinmmPlayback *self)
|
|||||||
SetDefaultWFXChannelOrder(device);
|
SetDefaultWFXChannelOrder(device);
|
||||||
|
|
||||||
ALuint BufferSize{device->UpdateSize *
|
ALuint BufferSize{device->UpdateSize *
|
||||||
FrameSizeFromDevFmt(device->FmtChans, device->FmtType, device->AmbiOrder)};
|
FrameSizeFromDevFmt(device->FmtChans, device->FmtType, device->mAmbiOrder)};
|
||||||
|
|
||||||
al_free(self->WaveBuffer[0].lpData);
|
al_free(self->WaveBuffer[0].lpData);
|
||||||
self->WaveBuffer[0] = WAVEHDR{};
|
self->WaveBuffer[0] = WAVEHDR{};
|
||||||
@ -564,7 +564,7 @@ ALCenum ALCwinmmCapture_open(ALCwinmmCapture *self, const ALCchar *deviceName)
|
|||||||
memset(&self->Format, 0, sizeof(WAVEFORMATEX));
|
memset(&self->Format, 0, sizeof(WAVEFORMATEX));
|
||||||
self->Format.wFormatTag = (device->FmtType == DevFmtFloat) ?
|
self->Format.wFormatTag = (device->FmtType == DevFmtFloat) ?
|
||||||
WAVE_FORMAT_IEEE_FLOAT : WAVE_FORMAT_PCM;
|
WAVE_FORMAT_IEEE_FLOAT : WAVE_FORMAT_PCM;
|
||||||
self->Format.nChannels = ChannelsFromDevFmt(device->FmtChans, device->AmbiOrder);
|
self->Format.nChannels = ChannelsFromDevFmt(device->FmtChans, device->mAmbiOrder);
|
||||||
self->Format.wBitsPerSample = BytesFromDevFmt(device->FmtType) * 8;
|
self->Format.wBitsPerSample = BytesFromDevFmt(device->FmtType) * 8;
|
||||||
self->Format.nBlockAlign = self->Format.wBitsPerSample *
|
self->Format.nBlockAlign = self->Format.wBitsPerSample *
|
||||||
self->Format.nChannels / 8;
|
self->Format.nChannels / 8;
|
||||||
|
@ -513,15 +513,15 @@ static void InitPanning(ALCdevice *device)
|
|||||||
if(device->FmtChans == DevFmtAmbi3D)
|
if(device->FmtChans == DevFmtAmbi3D)
|
||||||
{
|
{
|
||||||
const char *devname = device->DeviceName;
|
const char *devname = device->DeviceName;
|
||||||
const ALsizei *acnmap = (device->AmbiLayout == AmbiLayout_FuMa) ? FuMa2ACN : ACN2ACN;
|
const ALsizei *acnmap = (device->mAmbiLayout == AmbiLayout_FuMa) ? FuMa2ACN : ACN2ACN;
|
||||||
const ALfloat *n3dscale = (device->AmbiScale == AmbiNorm_FuMa) ? FuMa2N3DScale :
|
const ALfloat *n3dscale = (device->mAmbiScale == AmbiNorm_FuMa) ? FuMa2N3DScale :
|
||||||
(device->AmbiScale == AmbiNorm_SN3D) ? SN3D2N3DScale :
|
(device->mAmbiScale == AmbiNorm_SN3D) ? SN3D2N3DScale :
|
||||||
/*(device->AmbiScale == AmbiNorm_N3D) ?*/ N3D2N3DScale;
|
/*(device->mAmbiScale == AmbiNorm_N3D) ?*/ N3D2N3DScale;
|
||||||
ALfloat nfc_delay = 0.0f;
|
ALfloat nfc_delay = 0.0f;
|
||||||
|
|
||||||
count = (device->AmbiOrder == 3) ? 16 :
|
count = (device->mAmbiOrder == 3) ? 16 :
|
||||||
(device->AmbiOrder == 2) ? 9 :
|
(device->mAmbiOrder == 2) ? 9 :
|
||||||
(device->AmbiOrder == 1) ? 4 : 1;
|
(device->mAmbiOrder == 1) ? 4 : 1;
|
||||||
for(i = 0;i < count;i++)
|
for(i = 0;i < count;i++)
|
||||||
{
|
{
|
||||||
ALsizei acn = acnmap[i];
|
ALsizei acn = acnmap[i];
|
||||||
@ -531,7 +531,7 @@ static void InitPanning(ALCdevice *device)
|
|||||||
device->Dry.CoeffCount = 0;
|
device->Dry.CoeffCount = 0;
|
||||||
device->Dry.NumChannels = count;
|
device->Dry.NumChannels = count;
|
||||||
|
|
||||||
if(device->AmbiOrder < 2)
|
if(device->mAmbiOrder < 2)
|
||||||
{
|
{
|
||||||
device->FOAOut.Ambi = device->Dry.Ambi;
|
device->FOAOut.Ambi = device->Dry.Ambi;
|
||||||
device->FOAOut.CoeffCount = device->Dry.CoeffCount;
|
device->FOAOut.CoeffCount = device->Dry.CoeffCount;
|
||||||
@ -553,7 +553,7 @@ static void InitPanning(ALCdevice *device)
|
|||||||
device->FOAOut.CoeffCount = 0;
|
device->FOAOut.CoeffCount = 0;
|
||||||
device->FOAOut.NumChannels = 4;
|
device->FOAOut.NumChannels = 4;
|
||||||
|
|
||||||
if(device->AmbiOrder >= 3)
|
if(device->mAmbiOrder >= 3)
|
||||||
{
|
{
|
||||||
w_scale = W_SCALE_3H3P;
|
w_scale = W_SCALE_3H3P;
|
||||||
xyz_scale = XYZ_SCALE_3H3P;
|
xyz_scale = XYZ_SCALE_3H3P;
|
||||||
@ -573,7 +573,7 @@ static void InitPanning(ALCdevice *device)
|
|||||||
};
|
};
|
||||||
nfc_delay = clampf(nfc_delay, 0.001f, 1000.0f);
|
nfc_delay = clampf(nfc_delay, 0.001f, 1000.0f);
|
||||||
InitNearFieldCtrl(device, nfc_delay * SPEEDOFSOUNDMETRESPERSEC,
|
InitNearFieldCtrl(device, nfc_delay * SPEEDOFSOUNDMETRESPERSEC,
|
||||||
device->AmbiOrder, chans_per_order);
|
device->mAmbiOrder, chans_per_order);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -759,7 +759,7 @@ static void InitHQPanning(ALCdevice *device, const AmbDecConf *conf, const ALsiz
|
|||||||
device->FOAOut.NumChannels = count;
|
device->FOAOut.NumChannels = count;
|
||||||
}
|
}
|
||||||
|
|
||||||
device->RealOut.NumChannels = ChannelsFromDevFmt(device->FmtChans, device->AmbiOrder);
|
device->RealOut.NumChannels = ChannelsFromDevFmt(device->FmtChans, device->mAmbiOrder);
|
||||||
|
|
||||||
avg_dist = 0.0f;
|
avg_dist = 0.0f;
|
||||||
for(i = 0;i < conf->NumSpeakers;i++)
|
for(i = 0;i < conf->NumSpeakers;i++)
|
||||||
@ -889,7 +889,7 @@ static void InitHrtfPanning(ALCdevice *device)
|
|||||||
device->FOAOut.NumChannels = 0;
|
device->FOAOut.NumChannels = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
device->RealOut.NumChannels = ChannelsFromDevFmt(device->FmtChans, device->AmbiOrder);
|
device->RealOut.NumChannels = ChannelsFromDevFmt(device->FmtChans, device->mAmbiOrder);
|
||||||
|
|
||||||
BuildBFormatHrtf(device->HrtfHandle,
|
BuildBFormatHrtf(device->HrtfHandle,
|
||||||
device->Hrtf, device->Dry.NumChannels, AmbiPoints, AmbiMatrix, COUNTOF(AmbiPoints),
|
device->Hrtf, device->Dry.NumChannels, AmbiPoints, AmbiMatrix, COUNTOF(AmbiPoints),
|
||||||
@ -918,7 +918,7 @@ static void InitUhjPanning(ALCdevice *device)
|
|||||||
device->FOAOut.CoeffCount = device->Dry.CoeffCount;
|
device->FOAOut.CoeffCount = device->Dry.CoeffCount;
|
||||||
device->FOAOut.NumChannels = 0;
|
device->FOAOut.NumChannels = 0;
|
||||||
|
|
||||||
device->RealOut.NumChannels = ChannelsFromDevFmt(device->FmtChans, device->AmbiOrder);
|
device->RealOut.NumChannels = ChannelsFromDevFmt(device->FmtChans, device->mAmbiOrder);
|
||||||
}
|
}
|
||||||
|
|
||||||
void aluInitRenderer(ALCdevice *device, ALint hrtf_id, enum HrtfRequestMode hrtf_appreq, enum HrtfRequestMode hrtf_userreq)
|
void aluInitRenderer(ALCdevice *device, ALint hrtf_id, enum HrtfRequestMode hrtf_appreq, enum HrtfRequestMode hrtf_userreq)
|
||||||
@ -1009,7 +1009,7 @@ void aluInitRenderer(ALCdevice *device, ALint hrtf_id, enum HrtfRequestMode hrtf
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
bformatdec_free(&device->AmbiDecoder);
|
bformatdec_free(&device->AmbiDecoder);
|
||||||
if(device->FmtChans != DevFmtAmbi3D || device->AmbiOrder < 2)
|
if(device->FmtChans != DevFmtAmbi3D || device->mAmbiOrder < 2)
|
||||||
ambiup_free(&device->AmbiUp);
|
ambiup_free(&device->AmbiUp);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -584,12 +584,12 @@ struct ALCdevice_struct {
|
|||||||
DevFmtChannels FmtChans{};
|
DevFmtChannels FmtChans{};
|
||||||
DevFmtType FmtType{};
|
DevFmtType FmtType{};
|
||||||
ALboolean IsHeadphones{};
|
ALboolean IsHeadphones{};
|
||||||
ALsizei AmbiOrder{};
|
ALsizei mAmbiOrder{};
|
||||||
/* For DevFmtAmbi* output only, specifies the channel order and
|
/* For DevFmtAmbi* output only, specifies the channel order and
|
||||||
* normalization.
|
* normalization.
|
||||||
*/
|
*/
|
||||||
AmbiLayout AmbiLayout{};
|
AmbiLayout mAmbiLayout{};
|
||||||
AmbiNorm AmbiScale{};
|
AmbiNorm mAmbiScale{};
|
||||||
|
|
||||||
ALCenum LimiterState{ALC_DONT_CARE_SOFT};
|
ALCenum LimiterState{ALC_DONT_CARE_SOFT};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user