aboutsummaryrefslogtreecommitdiffstats
path: root/alc/backends/base.h
diff options
context:
space:
mode:
Diffstat (limited to 'alc/backends/base.h')
-rw-r--r--alc/backends/base.h16
1 files changed, 11 insertions, 5 deletions
diff --git a/alc/backends/base.h b/alc/backends/base.h
index 3a96c446..963d01a4 100644
--- a/alc/backends/base.h
+++ b/alc/backends/base.h
@@ -19,7 +19,7 @@ struct ClockLatency {
};
struct BackendBase {
- virtual void open(const ALCchar *name) = 0;
+ virtual void open(const char *name) = 0;
virtual bool reset();
virtual void start() = 0;
@@ -43,7 +43,7 @@ protected:
#ifdef _WIN32
/** Sets the channel order given the WaveFormatEx mask. */
- void setChannelOrderFromWFXMask(ALuint chanmask);
+ void setChannelOrderFromWFXMask(uint chanmask);
#endif
};
using BackendPtr = std::unique_ptr<BackendBase>;
@@ -93,19 +93,25 @@ protected:
namespace al {
+enum class backend_error {
+ NoDevice,
+ DeviceError,
+ OutOfMemory
+};
+
class backend_exception final : public base_exception {
- ALCenum mErrorCode;
+ backend_error mErrorCode;
public:
[[gnu::format(printf, 3, 4)]]
- backend_exception(ALCenum code, const char *msg, ...) : mErrorCode{code}
+ backend_exception(backend_error code, const char *msg, ...) : mErrorCode{code}
{
std::va_list args;
va_start(args, msg);
setMessage(msg, args);
va_end(args);
}
- ALCenum errorCode() const noexcept { return mErrorCode; }
+ backend_error errorCode() const noexcept { return mErrorCode; }
};
} // namespace al