aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/backends
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2019-06-08 23:49:15 -0700
committerChris Robinson <[email protected]>2019-06-08 23:49:15 -0700
commit2e154069c6aa3bfc9d00d420e2f508a4127dd649 (patch)
treeaa31339329f8fd04178d94b8a35a3d6314be5fd9 /Alc/backends
parentc9ba7ba19353c9cf55dec668b2b059c267d1b0ea (diff)
Use a bitfield for the device flags
Diffstat (limited to 'Alc/backends')
-rw-r--r--Alc/backends/alsa.cpp2
-rw-r--r--Alc/backends/dsound.cpp4
-rw-r--r--Alc/backends/opensl.cpp2
-rw-r--r--Alc/backends/pulseaudio.cpp4
-rw-r--r--Alc/backends/wasapi.cpp4
5 files changed, 8 insertions, 8 deletions
diff --git a/Alc/backends/alsa.cpp b/Alc/backends/alsa.cpp
index eee89b28..1c0d7489 100644
--- a/Alc/backends/alsa.cpp
+++ b/Alc/backends/alsa.cpp
@@ -725,7 +725,7 @@ ALCboolean AlsaPlayback::reset()
CHECK(snd_pcm_hw_params_set_channels(mPcmHandle, hp, mDevice->channelsFromFmt()));
/* set rate (implicitly constrains period/buffer parameters) */
if(!GetConfigValueBool(mDevice->DeviceName.c_str(), "alsa", "allow-resampler", 0) ||
- !(mDevice->Flags&DEVICE_FREQUENCY_REQUEST))
+ !mDevice->Flags.get(FrequencyRequest))
{
if(snd_pcm_hw_params_set_rate_resample(mPcmHandle, hp, 0) < 0)
ERR("Failed to disable ALSA resampler\n");
diff --git a/Alc/backends/dsound.cpp b/Alc/backends/dsound.cpp
index 039f78ac..480d9a18 100644
--- a/Alc/backends/dsound.cpp
+++ b/Alc/backends/dsound.cpp
@@ -359,7 +359,7 @@ ALCboolean DSoundPlayback::reset()
mDevice->FmtType = DevFmtUByte;
break;
case DevFmtFloat:
- if((mDevice->Flags&DEVICE_SAMPLE_TYPE_REQUEST))
+ if(mDevice->Flags.get(SampleTypeRequest))
break;
/* fall-through */
case DevFmtUShort:
@@ -380,7 +380,7 @@ ALCboolean DSoundPlayback::reset()
if(SUCCEEDED(hr))
{
speakers = DSSPEAKER_CONFIG(speakers);
- if(!(mDevice->Flags&DEVICE_CHANNELS_REQUEST))
+ if(!mDevice->Flags.get(ChannelsRequest))
{
if(speakers == DSSPEAKER_MONO)
mDevice->FmtChans = DevFmtMono;
diff --git a/Alc/backends/opensl.cpp b/Alc/backends/opensl.cpp
index 4cf7ca36..37495abe 100644
--- a/Alc/backends/opensl.cpp
+++ b/Alc/backends/opensl.cpp
@@ -361,7 +361,7 @@ ALCboolean OpenSLPlayback::reset()
mRing = nullptr;
#if 0
- if(!(mDevice->Flags&DEVICE_FREQUENCY_REQUEST))
+ if(!mDevice->Flags.get(FrequencyRequest))
{
/* FIXME: Disabled until I figure out how to get the Context needed for
* the getSystemService call.
diff --git a/Alc/backends/pulseaudio.cpp b/Alc/backends/pulseaudio.cpp
index 30c0053d..0b7257d1 100644
--- a/Alc/backends/pulseaudio.cpp
+++ b/Alc/backends/pulseaudio.cpp
@@ -779,7 +779,7 @@ void PulsePlayback::sinkInfoCallback(pa_context* UNUSED(context), const pa_sink_
);
if(chanmap != chanmaps.cend())
{
- if(!(mDevice->Flags&DEVICE_CHANNELS_REQUEST))
+ if(!mDevice->Flags.get(ChannelsRequest))
mDevice->FmtChans = chanmap->chans;
}
else
@@ -910,7 +910,7 @@ ALCboolean PulsePlayback::reset()
flags |= PA_STREAM_ADJUST_LATENCY;
}
if(GetConfigValueBool(mDevice->DeviceName.c_str(), "pulse", "fix-rate", 0) ||
- !(mDevice->Flags&DEVICE_FREQUENCY_REQUEST))
+ !mDevice->Flags.get(FrequencyRequest))
flags |= PA_STREAM_FIX_RATE;
pa_channel_map chanmap{};
diff --git a/Alc/backends/wasapi.cpp b/Alc/backends/wasapi.cpp
index c80e5943..6c3dc6e6 100644
--- a/Alc/backends/wasapi.cpp
+++ b/Alc/backends/wasapi.cpp
@@ -787,9 +787,9 @@ HRESULT WasapiPlayback::resetProxy()
const REFERENCE_TIME per_time{mDevice->UpdateSize * REFTIME_PER_SEC / mDevice->Frequency};
const REFERENCE_TIME buf_time{mDevice->BufferSize * REFTIME_PER_SEC / mDevice->Frequency};
- if(!(mDevice->Flags&DEVICE_FREQUENCY_REQUEST))
+ if(!mDevice->Flags.get(FrequencyRequest))
mDevice->Frequency = OutputType.Format.nSamplesPerSec;
- if(!(mDevice->Flags&DEVICE_CHANNELS_REQUEST))
+ if(!mDevice->Flags.get(ChannelsRequest))
{
if(OutputType.Format.nChannels == 1 && OutputType.dwChannelMask == MONO)
mDevice->FmtChans = DevFmtMono;