diff options
Diffstat (limited to 'alc/backends')
-rw-r--r-- | alc/backends/alsa.cpp | 4 | ||||
-rw-r--r-- | alc/backends/dsound.cpp | 4 | ||||
-rw-r--r-- | alc/backends/oboe.cpp | 6 | ||||
-rw-r--r-- | alc/backends/pulseaudio.cpp | 6 | ||||
-rw-r--r-- | alc/backends/wasapi.cpp | 4 |
5 files changed, 12 insertions, 12 deletions
diff --git a/alc/backends/alsa.cpp b/alc/backends/alsa.cpp index 814c2553..bdfdd040 100644 --- a/alc/backends/alsa.cpp +++ b/alc/backends/alsa.cpp @@ -746,8 +746,8 @@ bool AlsaPlayback::reset() } CHECK(snd_pcm_hw_params_set_channels(mPcmHandle, hp.get(), mDevice->channelsFromFmt())); /* set rate (implicitly constrains period/buffer parameters) */ - if(!GetConfigValueBool(mDevice->DeviceName.c_str(), "alsa", "allow-resampler", 0) || - !mDevice->Flags.get<FrequencyRequest>()) + if(!GetConfigValueBool(mDevice->DeviceName.c_str(), "alsa", "allow-resampler", 0) + || !mDevice->Flags.test(FrequencyRequest)) { if(snd_pcm_hw_params_set_rate_resample(mPcmHandle, hp.get(), 0) < 0) ERR("Failed to disable ALSA resampler\n"); diff --git a/alc/backends/dsound.cpp b/alc/backends/dsound.cpp index a09def73..aa3a92a0 100644 --- a/alc/backends/dsound.cpp +++ b/alc/backends/dsound.cpp @@ -377,7 +377,7 @@ bool DSoundPlayback::reset() mDevice->FmtType = DevFmtUByte; break; case DevFmtFloat: - if(mDevice->Flags.get<SampleTypeRequest>()) + if(mDevice->Flags.test(SampleTypeRequest)) break; /* fall-through */ case DevFmtUShort: @@ -398,7 +398,7 @@ bool DSoundPlayback::reset() if(SUCCEEDED(hr)) { speakers = DSSPEAKER_CONFIG(speakers); - if(!mDevice->Flags.get<ChannelsRequest>()) + if(!mDevice->Flags.test(ChannelsRequest)) { if(speakers == DSSPEAKER_MONO) mDevice->FmtChans = DevFmtMono; diff --git a/alc/backends/oboe.cpp b/alc/backends/oboe.cpp index 2913b6db..5b0d121d 100644 --- a/alc/backends/oboe.cpp +++ b/alc/backends/oboe.cpp @@ -87,9 +87,9 @@ bool OboePlayback::reset() builder.setFormatConversionAllowed(false); builder.setCallback(this); - if(mDevice->Flags.get<FrequencyRequest>()) + if(mDevice->Flags.test(FrequencyRequest)) builder.setSampleRate(static_cast<int32_t>(mDevice->Frequency)); - if(mDevice->Flags.get<ChannelsRequest>()) + if(mDevice->Flags.test(ChannelsRequest)) { /* Only use mono or stereo at user request. There's no telling what * other counts may be inferred as. @@ -98,7 +98,7 @@ bool OboePlayback::reset() : (mDevice->FmtChans==DevFmtStereo) ? oboe::ChannelCount::Stereo : oboe::ChannelCount::Unspecified); } - if(mDevice->Flags.get<SampleTypeRequest>()) + if(mDevice->Flags.test(SampleTypeRequest)) { oboe::AudioFormat format{oboe::AudioFormat::Unspecified}; switch(mDevice->FmtType) diff --git a/alc/backends/pulseaudio.cpp b/alc/backends/pulseaudio.cpp index 1b727335..a6aa93a5 100644 --- a/alc/backends/pulseaudio.cpp +++ b/alc/backends/pulseaudio.cpp @@ -793,7 +793,7 @@ void PulsePlayback::sinkInfoCallback(pa_context*, const pa_sink_info *info, int ); if(chaniter != chanmaps.cend()) { - if(!mDevice->Flags.get<ChannelsRequest>()) + if(!mDevice->Flags.test(ChannelsRequest)) mDevice->FmtChans = chaniter->fmt; } else @@ -914,8 +914,8 @@ bool PulsePlayback::reset() flags &= ~PA_STREAM_EARLY_REQUESTS; flags |= PA_STREAM_ADJUST_LATENCY; } - if(GetConfigValueBool(mDevice->DeviceName.c_str(), "pulse", "fix-rate", 0) || - !mDevice->Flags.get<FrequencyRequest>()) + if(GetConfigValueBool(mDevice->DeviceName.c_str(), "pulse", "fix-rate", 0) + || !mDevice->Flags.test(FrequencyRequest)) flags |= PA_STREAM_FIX_RATE; pa_channel_map chanmap{}; diff --git a/alc/backends/wasapi.cpp b/alc/backends/wasapi.cpp index a0eb814f..1d1b93c4 100644 --- a/alc/backends/wasapi.cpp +++ b/alc/backends/wasapi.cpp @@ -924,9 +924,9 @@ HRESULT WasapiPlayback::resetProxy() const ReferenceTime per_time{ReferenceTime{seconds{mDevice->UpdateSize}} / mDevice->Frequency}; const ReferenceTime buf_time{ReferenceTime{seconds{mDevice->BufferSize}} / mDevice->Frequency}; - if(!mDevice->Flags.get<FrequencyRequest>()) + if(!mDevice->Flags.test(FrequencyRequest)) mDevice->Frequency = OutputType.Format.nSamplesPerSec; - if(!mDevice->Flags.get<ChannelsRequest>()) + if(!mDevice->Flags.test(ChannelsRequest)) { const uint32_t chancount{OutputType.Format.nChannels}; const DWORD chanmask{OutputType.dwChannelMask}; |