aboutsummaryrefslogtreecommitdiffstats
path: root/alc/backends
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2023-05-04 08:03:40 -0700
committerChris Robinson <[email protected]>2023-05-04 08:03:40 -0700
commit7cda37a67c8f147536c53f0073df9a9e61d40587 (patch)
tree68a0997c94ec905dd3438f26418234bf63aa76f4 /alc/backends
parent40483b512218bab50fccaaeb11b51e5ca528fbe1 (diff)
Replace al::optional with std::optional
Diffstat (limited to 'alc/backends')
-rw-r--r--alc/backends/alsa.cpp1
-rw-r--r--alc/backends/base.cpp1
-rw-r--r--alc/backends/oss.cpp1
-rw-r--r--alc/backends/pipewire.cpp8
-rw-r--r--alc/backends/pulseaudio.cpp6
5 files changed, 7 insertions, 10 deletions
diff --git a/alc/backends/alsa.cpp b/alc/backends/alsa.cpp
index d620a83c..01021868 100644
--- a/alc/backends/alsa.cpp
+++ b/alc/backends/alsa.cpp
@@ -39,7 +39,6 @@
#include "alc/alconfig.h"
#include "almalloc.h"
#include "alnumeric.h"
-#include "aloptional.h"
#include "core/device.h"
#include "core/helpers.h"
#include "core/logging.h"
diff --git a/alc/backends/base.cpp b/alc/backends/base.cpp
index e5ad8494..45254c47 100644
--- a/alc/backends/base.cpp
+++ b/alc/backends/base.cpp
@@ -14,7 +14,6 @@
#include "albit.h"
#include "core/logging.h"
-#include "aloptional.h"
#endif
#include "atomic.h"
diff --git a/alc/backends/oss.cpp b/alc/backends/oss.cpp
index 6d4fa261..f76024f4 100644
--- a/alc/backends/oss.cpp
+++ b/alc/backends/oss.cpp
@@ -45,7 +45,6 @@
#include "alc/alconfig.h"
#include "almalloc.h"
#include "alnumeric.h"
-#include "aloptional.h"
#include "core/device.h"
#include "core/helpers.h"
#include "core/logging.h"
diff --git a/alc/backends/pipewire.cpp b/alc/backends/pipewire.cpp
index c6569a74..d3c8e77e 100644
--- a/alc/backends/pipewire.cpp
+++ b/alc/backends/pipewire.cpp
@@ -31,6 +31,7 @@
#include <list>
#include <memory>
#include <mutex>
+#include <optional>
#include <stdint.h>
#include <thread>
#include <type_traits>
@@ -40,7 +41,6 @@
#include "alc/alconfig.h"
#include "almalloc.h"
#include "alnumeric.h"
-#include "aloptional.h"
#include "alspan.h"
#include "alstring.h"
#include "core/devformat.h"
@@ -304,12 +304,12 @@ al::span<const Pod_t<T>> get_array_span(const spa_pod *pod)
}
template<uint32_t T>
-al::optional<Pod_t<T>> get_value(const spa_pod *value)
+std::optional<Pod_t<T>> get_value(const spa_pod *value)
{
Pod_t<T> val{};
if(PodInfo<T>::get_value(value, &val) == 0)
return val;
- return al::nullopt;
+ return std::nullopt;
}
/* Internally, PipeWire types "inherit" from each other, but this is hidden
@@ -997,7 +997,7 @@ int MetadataProxy::propertyCallback(uint32_t id, const char *key, const char *ty
auto get_json_string = [](spa_json *iter)
{
- al::optional<std::string> str;
+ std::optional<std::string> str;
const char *val{};
int len{spa_json_next(iter, &val)};
diff --git a/alc/backends/pulseaudio.cpp b/alc/backends/pulseaudio.cpp
index 4b0e316f..6f706c7f 100644
--- a/alc/backends/pulseaudio.cpp
+++ b/alc/backends/pulseaudio.cpp
@@ -31,6 +31,7 @@
#include <cstring>
#include <limits>
#include <mutex>
+#include <optional>
#include <stdint.h>
#include <stdlib.h>
#include <string>
@@ -41,7 +42,6 @@
#include "alc/alconfig.h"
#include "almalloc.h"
#include "alnumeric.h"
-#include "aloptional.h"
#include "alspan.h"
#include "core/devformat.h"
#include "core/device.h"
@@ -615,7 +615,7 @@ struct PulsePlayback final : public BackendBase {
PulseMainloop mMainloop;
- al::optional<std::string> mDeviceName{al::nullopt};
+ std::optional<std::string> mDeviceName{std::nullopt};
bool mIs51Rear{false};
pa_buffer_attr mAttr;
@@ -1042,7 +1042,7 @@ struct PulseCapture final : public BackendBase {
PulseMainloop mMainloop;
- al::optional<std::string> mDeviceName{al::nullopt};
+ std::optional<std::string> mDeviceName{std::nullopt};
al::span<const al::byte> mCapBuffer;
size_t mHoleLength{0};