diff options
Diffstat (limited to 'Alc/backends')
35 files changed, 127 insertions, 133 deletions
diff --git a/Alc/backends/alsa.cpp b/Alc/backends/alsa.cpp index c5d75fe3..543c2bee 100644 --- a/Alc/backends/alsa.cpp +++ b/Alc/backends/alsa.cpp @@ -1266,8 +1266,8 @@ void AlsaBackendFactory::deinit() #endif } -bool AlsaBackendFactory::querySupport(ALCbackend_Type type) -{ return (type == ALCbackend_Playback || type == ALCbackend_Capture); } +bool AlsaBackendFactory::querySupport(BackendType type) +{ return (type == BackendType::Playback || type == BackendType::Capture); } void AlsaBackendFactory::probe(DevProbe type, std::string *outnames) { @@ -1292,11 +1292,11 @@ void AlsaBackendFactory::probe(DevProbe type, std::string *outnames) } } -BackendBase *AlsaBackendFactory::createBackend(ALCdevice *device, ALCbackend_Type type) +BackendBase *AlsaBackendFactory::createBackend(ALCdevice *device, BackendType type) { - if(type == ALCbackend_Playback) + if(type == BackendType::Playback) return new AlsaPlayback{device}; - if(type == ALCbackend_Capture) + if(type == BackendType::Capture) return new AlsaCapture{device}; return nullptr; } diff --git a/Alc/backends/alsa.h b/Alc/backends/alsa.h index e9169c48..15a646f9 100644 --- a/Alc/backends/alsa.h +++ b/Alc/backends/alsa.h @@ -8,11 +8,11 @@ public: bool init() override; void deinit() override; - bool querySupport(ALCbackend_Type type) override; + bool querySupport(BackendType type) override; void probe(DevProbe type, std::string *outnames) override; - BackendBase *createBackend(ALCdevice *device, ALCbackend_Type type) override; + BackendBase *createBackend(ALCdevice *device, BackendType type) override; static BackendFactory &getFactory(); }; diff --git a/Alc/backends/base.h b/Alc/backends/base.h index b9ea3b61..0fc7de38 100644 --- a/Alc/backends/base.h +++ b/Alc/backends/base.h @@ -55,10 +55,10 @@ struct BackendBase { }; -enum ALCbackend_Type { - ALCbackend_Playback, - ALCbackend_Capture, - ALCbackend_Loopback +enum class BackendType { + Playback, + Capture, + Loopback }; @@ -66,11 +66,11 @@ struct BackendFactory { virtual bool init() = 0; virtual void deinit() { } - virtual bool querySupport(ALCbackend_Type type) = 0; + virtual bool querySupport(BackendType type) = 0; virtual void probe(DevProbe type, std::string *outnames) = 0; - virtual BackendBase *createBackend(ALCdevice *device, ALCbackend_Type type) = 0; + virtual BackendBase *createBackend(ALCdevice *device, BackendType type) = 0; }; #endif /* ALC_BACKENDS_BASE_H */ diff --git a/Alc/backends/coreaudio.cpp b/Alc/backends/coreaudio.cpp index f117ea59..f4010631 100644 --- a/Alc/backends/coreaudio.cpp +++ b/Alc/backends/coreaudio.cpp @@ -688,8 +688,8 @@ BackendFactory &CoreAudioBackendFactory::getFactory() bool CoreAudioBackendFactory::init() { return true; } -bool CoreAudioBackendFactory::querySupport(ALCbackend_Type type) -{ return (type == ALCbackend_Playback || ALCbackend_Capture); } +bool CoreAudioBackendFactory::querySupport(BackendType type) +{ return type == BackendType::Playback || type == BackendType::Capture; } void CoreAudioBackendFactory::probe(DevProbe type, std::string *outnames) { @@ -703,11 +703,11 @@ void CoreAudioBackendFactory::probe(DevProbe type, std::string *outnames) } } -BackendBase *CoreAudioBackendFactory::createBackend(ALCdevice *device, ALCbackend_Type type) +BackendBase *CoreAudioBackendFactory::createBackend(ALCdevice *device, BackendType type) { - if(type == ALCbackend_Playback) + if(type == BackendType::Playback) return new CoreAudioPlayback{device}; - if(type == ALCbackend_Capture) + if(type == BackendType::Capture) return new CoreAudioCapture{device}; return nullptr; } diff --git a/Alc/backends/coreaudio.h b/Alc/backends/coreaudio.h index db151b8a..d0ac9558 100644 --- a/Alc/backends/coreaudio.h +++ b/Alc/backends/coreaudio.h @@ -8,11 +8,11 @@ public: bool init() override; /*void deinit() override;*/ - bool querySupport(ALCbackend_Type type) override; + bool querySupport(BackendType type) override; void probe(DevProbe type, std::string *outnames) override; - BackendBase *createBackend(ALCdevice *device, ALCbackend_Type type) override; + BackendBase *createBackend(ALCdevice *device, BackendType type) override; static BackendFactory &getFactory(); }; diff --git a/Alc/backends/dsound.cpp b/Alc/backends/dsound.cpp index 44e6fde4..bdb9cf28 100644 --- a/Alc/backends/dsound.cpp +++ b/Alc/backends/dsound.cpp @@ -911,8 +911,8 @@ void DSoundBackendFactory::deinit() #endif } -bool DSoundBackendFactory::querySupport(ALCbackend_Type type) -{ return (type == ALCbackend_Playback || type == ALCbackend_Capture); } +bool DSoundBackendFactory::querySupport(BackendType type) +{ return (type == BackendType::Playback || type == BackendType::Capture); } void DSoundBackendFactory::probe(DevProbe type, std::string *outnames) { @@ -949,11 +949,11 @@ void DSoundBackendFactory::probe(DevProbe type, std::string *outnames) CoUninitialize(); } -BackendBase *DSoundBackendFactory::createBackend(ALCdevice *device, ALCbackend_Type type) +BackendBase *DSoundBackendFactory::createBackend(ALCdevice *device, BackendType type) { - if(type == ALCbackend_Playback) + if(type == BackendType::Playback) return new DSoundPlayback{device}; - if(type == ALCbackend_Capture) + if(type == BackendType::Capture) return new DSoundCapture{device}; return nullptr; } diff --git a/Alc/backends/dsound.h b/Alc/backends/dsound.h index 93b76c7c..819c4231 100644 --- a/Alc/backends/dsound.h +++ b/Alc/backends/dsound.h @@ -8,11 +8,11 @@ public: bool init() override; void deinit() override; - bool querySupport(ALCbackend_Type type) override; + bool querySupport(BackendType type) override; void probe(DevProbe type, std::string *outnames) override; - BackendBase *createBackend(ALCdevice *device, ALCbackend_Type type) override; + BackendBase *createBackend(ALCdevice *device, BackendType type) override; static BackendFactory &getFactory(); }; diff --git a/Alc/backends/jack.cpp b/Alc/backends/jack.cpp index 77bbf487..eb96392f 100644 --- a/Alc/backends/jack.cpp +++ b/Alc/backends/jack.cpp @@ -541,8 +541,8 @@ void JackBackendFactory::deinit() #endif } -bool JackBackendFactory::querySupport(ALCbackend_Type type) -{ return (type == ALCbackend_Playback); } +bool JackBackendFactory::querySupport(BackendType type) +{ return (type == BackendType::Playback); } void JackBackendFactory::probe(DevProbe type, std::string *outnames) { @@ -558,9 +558,9 @@ void JackBackendFactory::probe(DevProbe type, std::string *outnames) } } -BackendBase *JackBackendFactory::createBackend(ALCdevice *device, ALCbackend_Type type) +BackendBase *JackBackendFactory::createBackend(ALCdevice *device, BackendType type) { - if(type == ALCbackend_Playback) + if(type == BackendType::Playback) return new JackPlayback{device}; return nullptr; } diff --git a/Alc/backends/jack.h b/Alc/backends/jack.h index b9bb13b2..421fafde 100644 --- a/Alc/backends/jack.h +++ b/Alc/backends/jack.h @@ -8,11 +8,11 @@ public: bool init() override; void deinit() override; - bool querySupport(ALCbackend_Type type) override; + bool querySupport(BackendType type) override; void probe(DevProbe type, std::string *outnames) override; - BackendBase *createBackend(ALCdevice *device, ALCbackend_Type type) override; + BackendBase *createBackend(ALCdevice *device, BackendType type) override; static BackendFactory &getFactory(); }; diff --git a/Alc/backends/loopback.cpp b/Alc/backends/loopback.cpp index 373b11c9..6bce90ff 100644 --- a/Alc/backends/loopback.cpp +++ b/Alc/backends/loopback.cpp @@ -64,15 +64,15 @@ void LoopbackBackend::stop() bool LoopbackBackendFactory::init() { return true; } -bool LoopbackBackendFactory::querySupport(ALCbackend_Type type) -{ return (type == ALCbackend_Loopback); } +bool LoopbackBackendFactory::querySupport(BackendType type) +{ return (type == BackendType::Loopback); } void LoopbackBackendFactory::probe(DevProbe, std::string*) { } -BackendBase *LoopbackBackendFactory::createBackend(ALCdevice *device, ALCbackend_Type type) +BackendBase *LoopbackBackendFactory::createBackend(ALCdevice *device, BackendType type) { - if(type == ALCbackend_Loopback) + if(type == BackendType::Loopback) new LoopbackBackend{device}; return nullptr; } diff --git a/Alc/backends/loopback.h b/Alc/backends/loopback.h index ab37c2d7..cf5eb02a 100644 --- a/Alc/backends/loopback.h +++ b/Alc/backends/loopback.h @@ -8,11 +8,11 @@ public: bool init() override; /*void deinit() override;*/ - bool querySupport(ALCbackend_Type type) override; + bool querySupport(BackendType type) override; void probe(DevProbe type, std::string *outnames) override; - BackendBase *createBackend(ALCdevice *device, ALCbackend_Type type) override; + BackendBase *createBackend(ALCdevice *device, BackendType type) override; static BackendFactory &getFactory(); }; diff --git a/Alc/backends/null.cpp b/Alc/backends/null.cpp index 33340a5d..480b5554 100644 --- a/Alc/backends/null.cpp +++ b/Alc/backends/null.cpp @@ -153,8 +153,8 @@ void NullBackend::stop() bool NullBackendFactory::init() { return true; } -bool NullBackendFactory::querySupport(ALCbackend_Type type) -{ return (type == ALCbackend_Playback); } +bool NullBackendFactory::querySupport(BackendType type) +{ return (type == BackendType::Playback); } void NullBackendFactory::probe(DevProbe type, std::string *outnames) { @@ -169,9 +169,9 @@ void NullBackendFactory::probe(DevProbe type, std::string *outnames) } } -BackendBase *NullBackendFactory::createBackend(ALCdevice *device, ALCbackend_Type type) +BackendBase *NullBackendFactory::createBackend(ALCdevice *device, BackendType type) { - if(type == ALCbackend_Playback) + if(type == BackendType::Playback) return new NullBackend{device}; return nullptr; } diff --git a/Alc/backends/null.h b/Alc/backends/null.h index d4164198..87796b7a 100644 --- a/Alc/backends/null.h +++ b/Alc/backends/null.h @@ -8,11 +8,11 @@ public: bool init() override; /*void deinit() override;*/ - bool querySupport(ALCbackend_Type type) override; + bool querySupport(BackendType type) override; void probe(DevProbe type, std::string *outnames) override; - BackendBase *createBackend(ALCdevice *device, ALCbackend_Type type) override; + BackendBase *createBackend(ALCdevice *device, BackendType type) override; static BackendFactory &getFactory(); }; diff --git a/Alc/backends/opensl.cpp b/Alc/backends/opensl.cpp index 4f2e07be..c6a8cf82 100644 --- a/Alc/backends/opensl.cpp +++ b/Alc/backends/opensl.cpp @@ -919,8 +919,8 @@ ALCuint OpenSLCapture::availableSamples() bool OSLBackendFactory::init() { return true; } -bool OSLBackendFactory::querySupport(ALCbackend_Type type) -{ return (type == ALCbackend_Playback || type == ALCbackend_Capture); } +bool OSLBackendFactory::querySupport(BackendType type) +{ return (type == BackendType::Playback || type == BackendType::Capture); } void OSLBackendFactory::probe(DevProbe type, std::string *outnames) { @@ -934,11 +934,11 @@ void OSLBackendFactory::probe(DevProbe type, std::string *outnames) } } -BackendBase *OSLBackendFactory::createBackend(ALCdevice *device, ALCbackend_Type type) +BackendBase *OSLBackendFactory::createBackend(ALCdevice *device, BackendType type) { - if(type == ALCbackend_Playback) + if(type == BackendType::Playback) return new OpenSLPlayback{device}; - if(type == ALCbackend_Capture) + if(type == BackendType::Capture) return new OpenSLCapture{device}; return nullptr; } diff --git a/Alc/backends/opensl.h b/Alc/backends/opensl.h index bab15115..d553b80d 100644 --- a/Alc/backends/opensl.h +++ b/Alc/backends/opensl.h @@ -8,11 +8,11 @@ public: bool init() override; /*void deinit() override;*/ - bool querySupport(ALCbackend_Type type) override; + bool querySupport(BackendType type) override; void probe(DevProbe type, std::string *outnames) override; - BackendBase *createBackend(ALCdevice *device, ALCbackend_Type type) override; + BackendBase *createBackend(ALCdevice *device, BackendType type) override; static BackendFactory &getFactory(); }; diff --git a/Alc/backends/oss.cpp b/Alc/backends/oss.cpp index c2139d4d..90da18c7 100644 --- a/Alc/backends/oss.cpp +++ b/Alc/backends/oss.cpp @@ -718,8 +718,8 @@ void OSSBackendFactory::deinit() CaptureDevices.clear(); } -bool OSSBackendFactory::querySupport(ALCbackend_Type type) -{ return (type == ALCbackend_Playback || type == ALCbackend_Capture); } +bool OSSBackendFactory::querySupport(BackendType type) +{ return (type == BackendType::Playback || type == BackendType::Capture); } void OSSBackendFactory::probe(DevProbe type, std::string *outnames) { @@ -751,11 +751,11 @@ void OSSBackendFactory::probe(DevProbe type, std::string *outnames) } } -BackendBase *OSSBackendFactory::createBackend(ALCdevice *device, ALCbackend_Type type) +BackendBase *OSSBackendFactory::createBackend(ALCdevice *device, BackendType type) { - if(type == ALCbackend_Playback) + if(type == BackendType::Playback) return new OSSPlayback{device}; - if(type == ALCbackend_Capture) + if(type == BackendType::Capture) return new OSScapture{device}; return nullptr; } diff --git a/Alc/backends/oss.h b/Alc/backends/oss.h index 8f65f1cc..f59bfe18 100644 --- a/Alc/backends/oss.h +++ b/Alc/backends/oss.h @@ -8,11 +8,11 @@ public: bool init() override; void deinit() override; - bool querySupport(ALCbackend_Type type) override; + bool querySupport(BackendType type) override; void probe(DevProbe type, std::string *outnames) override; - BackendBase *createBackend(ALCdevice *device, ALCbackend_Type type) override; + BackendBase *createBackend(ALCdevice *device, BackendType type) override; static BackendFactory &getFactory(); }; diff --git a/Alc/backends/portaudio.cpp b/Alc/backends/portaudio.cpp index 34688db9..ae01da70 100644 --- a/Alc/backends/portaudio.cpp +++ b/Alc/backends/portaudio.cpp @@ -452,8 +452,8 @@ void PortBackendFactory::deinit() #endif } -bool PortBackendFactory::querySupport(ALCbackend_Type type) -{ return (type == ALCbackend_Playback || type == ALCbackend_Capture); } +bool PortBackendFactory::querySupport(BackendType type) +{ return (type == BackendType::Playback || type == BackendType::Capture); } void PortBackendFactory::probe(DevProbe type, std::string *outnames) { @@ -467,11 +467,11 @@ void PortBackendFactory::probe(DevProbe type, std::string *outnames) } } -BackendBase *PortBackendFactory::createBackend(ALCdevice *device, ALCbackend_Type type) +BackendBase *PortBackendFactory::createBackend(ALCdevice *device, BackendType type) { - if(type == ALCbackend_Playback) + if(type == BackendType::Playback) return new PortPlayback{device}; - if(type == ALCbackend_Capture) + if(type == BackendType::Capture) return new PortCapture{device}; return nullptr; } diff --git a/Alc/backends/portaudio.h b/Alc/backends/portaudio.h index 7687c6b3..84ef11d9 100644 --- a/Alc/backends/portaudio.h +++ b/Alc/backends/portaudio.h @@ -8,11 +8,11 @@ public: bool init() override; void deinit() override; - bool querySupport(ALCbackend_Type type) override; + bool querySupport(BackendType type) override; void probe(DevProbe type, std::string *outnames) override; - BackendBase *createBackend(ALCdevice *device, ALCbackend_Type type) override; + BackendBase *createBackend(ALCdevice *device, BackendType type) override; static BackendFactory &getFactory(); }; diff --git a/Alc/backends/pulseaudio.cpp b/Alc/backends/pulseaudio.cpp index c911e365..8a089b88 100644 --- a/Alc/backends/pulseaudio.cpp +++ b/Alc/backends/pulseaudio.cpp @@ -524,10 +524,10 @@ al::vector<DevMap> CaptureDevices; pa_stream *pulse_connect_stream(const char *device_name, pa_threaded_mainloop *loop, pa_context *context, pa_stream_flags_t flags, pa_buffer_attr *attr, pa_sample_spec *spec, - pa_channel_map *chanmap, ALCbackend_Type type) + pa_channel_map *chanmap, BackendType type) { pa_stream *stream{pa_stream_new_with_proplist(context, - (type==ALCbackend_Playback) ? "Playback Stream" : "Capture Stream", spec, chanmap, + (type==BackendType::Playback) ? "Playback Stream" : "Capture Stream", spec, chanmap, prop_filter)}; if(!stream) { @@ -537,7 +537,7 @@ pa_stream *pulse_connect_stream(const char *device_name, pa_threaded_mainloop *l pa_stream_set_state_callback(stream, stream_state_callback, loop); - int err{(type==ALCbackend_Playback) ? + int err{(type==BackendType::Playback) ? pa_stream_connect_playback(stream, device_name, attr, flags, nullptr, nullptr) : pa_stream_connect_record(stream, device_name, attr, flags)}; if(err < 0) @@ -620,7 +620,7 @@ void probePlaybackDevices(void) spec.channels = 2; pa_stream *stream{pulse_connect_stream(nullptr, loop, context, flags, nullptr, &spec, - nullptr, ALCbackend_Playback)}; + nullptr, BackendType::Playback)}; if(stream) { pa_operation *op{pa_context_get_sink_info_by_name(context, @@ -702,7 +702,7 @@ void probeCaptureDevices(void) spec.channels = 1; pa_stream *stream{pulse_connect_stream(nullptr, loop, context, flags, nullptr, &spec, - nullptr, ALCbackend_Capture)}; + nullptr, BackendType::Capture)}; if(stream) { pa_operation *op{pa_context_get_source_info_by_name(context, @@ -986,7 +986,7 @@ ALCenum PulsePlayback::open(const ALCchar *name) if(pulse_name && !pulse_name[0]) pulse_name = nullptr; } mStream = pulse_connect_stream(pulse_name, mLoop, mContext, flags, nullptr, &spec, nullptr, - ALCbackend_Playback); + BackendType::Playback); if(!mStream) { palock = unique_palock{}; @@ -1117,7 +1117,7 @@ ALCboolean PulsePlayback::reset() mAttr.fragsize = -1; mStream = pulse_connect_stream(mDeviceName.c_str(), mLoop, mContext, flags, &mAttr, &mSpec, - &chanmap, ALCbackend_Playback); + &chanmap, BackendType::Playback); if(!mStream) return ALC_FALSE; pa_stream_set_state_callback(mStream, &PulsePlayback::streamStateCallbackC, this); @@ -1445,7 +1445,7 @@ ALCenum PulseCapture::open(const ALCchar *name) TRACE("Connecting to \"%s\"\n", pulse_name ? pulse_name : "(default)"); mStream = pulse_connect_stream(pulse_name, mLoop, mContext, flags, &mAttr, &mSpec, &chanmap, - ALCbackend_Capture); + BackendType::Capture); if(!mStream) return ALC_INVALID_VALUE; pa_stream_set_moved_callback(mStream, &PulseCapture::streamMovedCallbackC, this); @@ -1638,12 +1638,8 @@ void PulseBackendFactory::deinit() /* PulseAudio doesn't like being CloseLib'd sometimes */ } -bool PulseBackendFactory::querySupport(ALCbackend_Type type) -{ - if(type == ALCbackend_Playback || type == ALCbackend_Capture) - return true; - return false; -} +bool PulseBackendFactory::querySupport(BackendType type) +{ return type == BackendType::Playback || type == BackendType::Capture; } void PulseBackendFactory::probe(DevProbe type, std::string *outnames) { @@ -1668,11 +1664,11 @@ void PulseBackendFactory::probe(DevProbe type, std::string *outnames) } } -BackendBase *PulseBackendFactory::createBackend(ALCdevice *device, ALCbackend_Type type) +BackendBase *PulseBackendFactory::createBackend(ALCdevice *device, BackendType type) { - if(type == ALCbackend_Playback) + if(type == BackendType::Playback) return new PulsePlayback{device}; - if(type == ALCbackend_Capture) + if(type == BackendType::Capture) return new PulseCapture{device}; return nullptr; } diff --git a/Alc/backends/pulseaudio.h b/Alc/backends/pulseaudio.h index 07d74b64..b7e71d82 100644 --- a/Alc/backends/pulseaudio.h +++ b/Alc/backends/pulseaudio.h @@ -8,11 +8,11 @@ public: bool init() override; void deinit() override; - bool querySupport(ALCbackend_Type type) override; + bool querySupport(BackendType type) override; void probe(DevProbe type, std::string *outnames) override; - BackendBase *createBackend(ALCdevice *device, ALCbackend_Type type) override; + BackendBase *createBackend(ALCdevice *device, BackendType type) override; static BackendFactory &getFactory(); }; diff --git a/Alc/backends/qsa.cpp b/Alc/backends/qsa.cpp index 7641ad57..0c695d92 100644 --- a/Alc/backends/qsa.cpp +++ b/Alc/backends/qsa.cpp @@ -927,8 +927,8 @@ void QSABackendFactory::deinit() CaptureNameMap.clear(); } -bool QSABackendFactory::querySupport(ALCbackend_Type type) -{ return (type == ALCbackend_Playback || type == ALCbackend_Capture); } +bool QSABackendFactory::querySupport(BackendType type) +{ return (type == BackendType::Playback || type == BackendType::Capture); } void QSABackendFactory::probe(DevProbe type, std::string *outnames) { @@ -952,11 +952,11 @@ void QSABackendFactory::probe(DevProbe type, std::string *outnames) } } -BackendBase *QSABackendFactory::createBackend(ALCdevice *device, ALCbackend_Type type) +BackendBase *QSABackendFactory::createBackend(ALCdevice *device, BackendType type) { - if(type == ALCbackend_Playback) + if(type == BackendType::Playback) return new PlaybackWrapper{device}; - if(type == ALCbackend_Capture) + if(type == BackendType::Capture) return new CaptureWrapper{device}; return nullptr; } diff --git a/Alc/backends/qsa.h b/Alc/backends/qsa.h index 46cc7dd1..c136f652 100644 --- a/Alc/backends/qsa.h +++ b/Alc/backends/qsa.h @@ -8,11 +8,11 @@ public: bool init() override; void deinit() override; - bool querySupport(ALCbackend_Type type) override; + bool querySupport(BackendType type) override; void probe(DevProbe type, std::string *outnames) override; - BackendBase *createBackend(ALCdevice *device, ALCbackend_Type type) override; + BackendBase *createBackend(ALCdevice *device, BackendType type) override; static BackendFactory &getFactory(); }; diff --git a/Alc/backends/sdl2.cpp b/Alc/backends/sdl2.cpp index 91d1cece..72c2dbcd 100644 --- a/Alc/backends/sdl2.cpp +++ b/Alc/backends/sdl2.cpp @@ -202,10 +202,8 @@ void SDL2BackendFactory::deinit() SDL_QuitSubSystem(SDL_INIT_AUDIO); } -bool SDL2BackendFactory::querySupport(ALCbackend_Type type) -{ - return (type == ALCbackend_Playback); -} +bool SDL2BackendFactory::querySupport(BackendType type) +{ return type == BackendType::Playback; } void SDL2BackendFactory::probe(DevProbe type, std::string *outnames) { @@ -225,9 +223,9 @@ void SDL2BackendFactory::probe(DevProbe type, std::string *outnames) } } -BackendBase *SDL2BackendFactory::createBackend(ALCdevice *device, ALCbackend_Type type) +BackendBase *SDL2BackendFactory::createBackend(ALCdevice *device, BackendType type) { - if(type == ALCbackend_Playback) + if(type == BackendType::Playback) return new Sdl2Backend{device}; return nullptr; } diff --git a/Alc/backends/sdl2.h b/Alc/backends/sdl2.h index 7a4ae9eb..34d30b16 100644 --- a/Alc/backends/sdl2.h +++ b/Alc/backends/sdl2.h @@ -8,11 +8,11 @@ public: bool init() override; void deinit() override; - bool querySupport(ALCbackend_Type type) override; + bool querySupport(BackendType type) override; void probe(DevProbe type, std::string *outnames) override; - BackendBase *createBackend(ALCdevice *device, ALCbackend_Type type) override; + BackendBase *createBackend(ALCdevice *device, BackendType type) override; static BackendFactory &getFactory(); }; diff --git a/Alc/backends/sndio.cpp b/Alc/backends/sndio.cpp index 2c2397e6..a592632c 100644 --- a/Alc/backends/sndio.cpp +++ b/Alc/backends/sndio.cpp @@ -477,8 +477,8 @@ BackendFactory &SndIOBackendFactory::getFactory() bool SndIOBackendFactory::init() { return true; } -bool SndIOBackendFactory::querySupport(ALCbackend_Type type) -{ return (type == ALCbackend_Playback || type == ALCbackend_Capture); } +bool SndIOBackendFactory::querySupport(BackendType type) +{ return (type == BackendType::Playback || type == BackendType::Capture); } void SndIOBackendFactory::probe(DevProbe type, std::string *outnames) { @@ -492,11 +492,11 @@ void SndIOBackendFactory::probe(DevProbe type, std::string *outnames) } } -BackendBase *SndIOBackendFactory::createBackend(ALCdevice *device, ALCbackend_Type type) +BackendBase *SndIOBackendFactory::createBackend(ALCdevice *device, BackendType type) { - if(type == ALCbackend_Playback) + if(type == BackendType::Playback) return new SndioPlayback{device}; - if(type == ALCbackend_Capture) + if(type == BackendType::Capture) return new SndioCapture{device}; return nullptr; } diff --git a/Alc/backends/sndio.h b/Alc/backends/sndio.h index bf8d833d..2280ca2c 100644 --- a/Alc/backends/sndio.h +++ b/Alc/backends/sndio.h @@ -8,11 +8,11 @@ public: bool init() override; /*void deinit() override;*/ - bool querySupport(ALCbackend_Type type) override; + bool querySupport(BackendType type) override; void probe(DevProbe type, std::string *outnames) override; - BackendBase *createBackend(ALCdevice *device, ALCbackend_Type type) override; + BackendBase *createBackend(ALCdevice *device, BackendType type) override; static BackendFactory &getFactory(); }; diff --git a/Alc/backends/solaris.cpp b/Alc/backends/solaris.cpp index 6463c225..5b93f8ca 100644 --- a/Alc/backends/solaris.cpp +++ b/Alc/backends/solaris.cpp @@ -270,8 +270,8 @@ bool SolarisBackendFactory::init() return true; } -bool SolarisBackendFactory::querySupport(ALCbackend_Type type) -{ return (type == ALCbackend_Playback); } +bool SolarisBackendFactory::querySupport(BackendType type) +{ return type == BackendType::Playback; } void SolarisBackendFactory::probe(DevProbe type, std::string *outnames) { @@ -292,9 +292,9 @@ void SolarisBackendFactory::probe(DevProbe type, std::string *outnames) } } -BackendBase *SolarisBackendFactory::createBackend(ALCdevice *device, ALCbackend_Type type) +BackendBase *SolarisBackendFactory::createBackend(ALCdevice *device, BackendType type) { - if(type == ALCbackend_Playback) + if(type == BackendType::Playback) return new SolarisBackend{device}; return nullptr; } diff --git a/Alc/backends/solaris.h b/Alc/backends/solaris.h index f675d6d7..60c5c677 100644 --- a/Alc/backends/solaris.h +++ b/Alc/backends/solaris.h @@ -8,11 +8,11 @@ public: bool init() override; /*void deinit() override;*/ - bool querySupport(ALCbackend_Type type) override; + bool querySupport(BackendType type) override; void probe(DevProbe type, std::string *outnames) override; - BackendBase *createBackend(ALCdevice *device, ALCbackend_Type type) override; + BackendBase *createBackend(ALCdevice *device, BackendType type) override; static BackendFactory &getFactory(); }; diff --git a/Alc/backends/wasapi.cpp b/Alc/backends/wasapi.cpp index 0d3d067e..ca4bdbd3 100644 --- a/Alc/backends/wasapi.cpp +++ b/Alc/backends/wasapi.cpp @@ -1773,8 +1773,8 @@ void WasapiBackendFactory::deinit() } } -bool WasapiBackendFactory::querySupport(ALCbackend_Type type) -{ return (type == ALCbackend_Playback || type == ALCbackend_Capture); } +bool WasapiBackendFactory::querySupport(BackendType type) +{ return type == BackendType::Playback || type == BackendType::Capture; } void WasapiBackendFactory::probe(DevProbe type, std::string *outnames) { @@ -1810,11 +1810,11 @@ void WasapiBackendFactory::probe(DevProbe type, std::string *outnames) } } -BackendBase *WasapiBackendFactory::createBackend(ALCdevice *device, ALCbackend_Type type) +BackendBase *WasapiBackendFactory::createBackend(ALCdevice *device, BackendType type) { - if(type == ALCbackend_Playback) + if(type == BackendType::Playback) return new WasapiPlayback{device}; - if(type == ALCbackend_Capture) + if(type == BackendType::Capture) return new WasapiCapture{device}; return nullptr; } diff --git a/Alc/backends/wasapi.h b/Alc/backends/wasapi.h index 47bd0e0c..16395371 100644 --- a/Alc/backends/wasapi.h +++ b/Alc/backends/wasapi.h @@ -8,11 +8,11 @@ public: bool init() override; void deinit() override; - bool querySupport(ALCbackend_Type type) override; + bool querySupport(BackendType type) override; void probe(DevProbe type, std::string *outnames) override; - BackendBase *createBackend(ALCdevice *device, ALCbackend_Type type) override; + BackendBase *createBackend(ALCdevice *device, BackendType type) override; static BackendFactory &getFactory(); }; diff --git a/Alc/backends/wave.cpp b/Alc/backends/wave.cpp index 01948b20..ef0f6db7 100644 --- a/Alc/backends/wave.cpp +++ b/Alc/backends/wave.cpp @@ -364,8 +364,8 @@ void WaveBackend::stop() bool WaveBackendFactory::init() { return true; } -bool WaveBackendFactory::querySupport(ALCbackend_Type type) -{ return (type == ALCbackend_Playback); } +bool WaveBackendFactory::querySupport(BackendType type) +{ return type == BackendType::Playback; } void WaveBackendFactory::probe(DevProbe type, std::string *outnames) { @@ -380,9 +380,9 @@ void WaveBackendFactory::probe(DevProbe type, std::string *outnames) } } -BackendBase *WaveBackendFactory::createBackend(ALCdevice *device, ALCbackend_Type type) +BackendBase *WaveBackendFactory::createBackend(ALCdevice *device, BackendType type) { - if(type == ALCbackend_Playback) + if(type == BackendType::Playback) return new WaveBackend{device}; return nullptr; } diff --git a/Alc/backends/wave.h b/Alc/backends/wave.h index 08d3f0c2..6dde7e0b 100644 --- a/Alc/backends/wave.h +++ b/Alc/backends/wave.h @@ -8,11 +8,11 @@ public: bool init() override; /*void deinit() override;*/ - bool querySupport(ALCbackend_Type type) override; + bool querySupport(BackendType type) override; void probe(DevProbe type, std::string *outnames) override; - BackendBase *createBackend(ALCdevice *device, ALCbackend_Type type) override; + BackendBase *createBackend(ALCdevice *device, BackendType type) override; static BackendFactory &getFactory(); }; diff --git a/Alc/backends/winmm.cpp b/Alc/backends/winmm.cpp index 5051aa00..dad505f4 100644 --- a/Alc/backends/winmm.cpp +++ b/Alc/backends/winmm.cpp @@ -607,8 +607,8 @@ void WinMMBackendFactory::deinit() CaptureDevices.clear(); } -bool WinMMBackendFactory::querySupport(ALCbackend_Type type) -{ return (type == ALCbackend_Playback || type == ALCbackend_Capture); } +bool WinMMBackendFactory::querySupport(BackendType type) +{ return type == BackendType::Playback || type == BackendType::Capture; } void WinMMBackendFactory::probe(DevProbe type, std::string *outnames) { @@ -634,11 +634,11 @@ void WinMMBackendFactory::probe(DevProbe type, std::string *outnames) } } -BackendBase *WinMMBackendFactory::createBackend(ALCdevice *device, ALCbackend_Type type) +BackendBase *WinMMBackendFactory::createBackend(ALCdevice *device, BackendType type) { - if(type == ALCbackend_Playback) + if(type == BackendType::Playback) return new WinMMPlayback{device}; - if(type == ALCbackend_Capture) + if(type == BackendType::Capture) return new WinMMCapture{device}; return nullptr; } diff --git a/Alc/backends/winmm.h b/Alc/backends/winmm.h index 63be6598..85f23b3a 100644 --- a/Alc/backends/winmm.h +++ b/Alc/backends/winmm.h @@ -8,11 +8,11 @@ public: bool init() override; void deinit() override; - bool querySupport(ALCbackend_Type type) override; + bool querySupport(BackendType type) override; void probe(DevProbe type, std::string *outnames) override; - BackendBase *createBackend(ALCdevice *device, ALCbackend_Type type) override; + BackendBase *createBackend(ALCdevice *device, BackendType type) override; static BackendFactory &getFactory(); }; |