aboutsummaryrefslogtreecommitdiffstats
path: root/alc
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2021-04-24 09:03:14 -0700
committerChris Robinson <[email protected]>2021-04-24 09:03:14 -0700
commit581174ef98e92de89244412ddc94ae93d172e69c (patch)
tree4c818d345ed460a2656bff8ce9355e36c6e3ba26 /alc
parentb54bb388a3dbd92518beef4bda03df5854aad1a9 (diff)
Use the DeviceBase for the backend
Diffstat (limited to 'alc')
-rw-r--r--alc/backends/alsa.cpp6
-rw-r--r--alc/backends/alsa.h2
-rw-r--r--alc/backends/base.h10
-rw-r--r--alc/backends/coreaudio.cpp6
-rw-r--r--alc/backends/coreaudio.h2
-rw-r--r--alc/backends/dsound.cpp6
-rw-r--r--alc/backends/dsound.h2
-rw-r--r--alc/backends/jack.cpp4
-rw-r--r--alc/backends/jack.h2
-rw-r--r--alc/backends/loopback.cpp4
-rw-r--r--alc/backends/loopback.h2
-rw-r--r--alc/backends/null.cpp4
-rw-r--r--alc/backends/null.h2
-rw-r--r--alc/backends/oboe.cpp6
-rw-r--r--alc/backends/oboe.h2
-rw-r--r--alc/backends/opensl.cpp6
-rw-r--r--alc/backends/opensl.h2
-rw-r--r--alc/backends/oss.cpp6
-rw-r--r--alc/backends/oss.h2
-rw-r--r--alc/backends/portaudio.cpp6
-rw-r--r--alc/backends/portaudio.h2
-rw-r--r--alc/backends/pulseaudio.cpp8
-rw-r--r--alc/backends/pulseaudio.h2
-rw-r--r--alc/backends/sdl2.cpp4
-rw-r--r--alc/backends/sdl2.h2
-rw-r--r--alc/backends/sndio.cpp6
-rw-r--r--alc/backends/sndio.h2
-rw-r--r--alc/backends/solaris.cpp4
-rw-r--r--alc/backends/solaris.h2
-rw-r--r--alc/backends/wasapi.cpp8
-rw-r--r--alc/backends/wasapi.h2
-rw-r--r--alc/backends/wave.cpp4
-rw-r--r--alc/backends/wave.h2
-rw-r--r--alc/backends/winmm.cpp6
-rw-r--r--alc/backends/winmm.h2
35 files changed, 69 insertions, 69 deletions
diff --git a/alc/backends/alsa.cpp b/alc/backends/alsa.cpp
index 1153b99a..a6c7e178 100644
--- a/alc/backends/alsa.cpp
+++ b/alc/backends/alsa.cpp
@@ -408,7 +408,7 @@ int verify_state(snd_pcm_t *handle)
struct AlsaPlayback final : public BackendBase {
- AlsaPlayback(ALCdevice *device) noexcept : BackendBase{device} { }
+ AlsaPlayback(DeviceBase *device) noexcept : BackendBase{device} { }
~AlsaPlayback() override;
int mixerProc();
@@ -868,7 +868,7 @@ ClockLatency AlsaPlayback::getClockLatency()
struct AlsaCapture final : public BackendBase {
- AlsaCapture(ALCdevice *device) noexcept : BackendBase{device} { }
+ AlsaCapture(DeviceBase *device) noexcept : BackendBase{device} { }
~AlsaCapture() override;
void open(const char *name) override;
@@ -1257,7 +1257,7 @@ std::string AlsaBackendFactory::probe(BackendType type)
return outnames;
}
-BackendPtr AlsaBackendFactory::createBackend(ALCdevice *device, BackendType type)
+BackendPtr AlsaBackendFactory::createBackend(DeviceBase *device, BackendType type)
{
if(type == BackendType::Playback)
return BackendPtr{new AlsaPlayback{device}};
diff --git a/alc/backends/alsa.h b/alc/backends/alsa.h
index 12023cb6..1a28e6b9 100644
--- a/alc/backends/alsa.h
+++ b/alc/backends/alsa.h
@@ -11,7 +11,7 @@ public:
std::string probe(BackendType type) override;
- BackendPtr createBackend(ALCdevice *device, BackendType type) override;
+ BackendPtr createBackend(DeviceBase *device, BackendType type) override;
static BackendFactory &getFactory();
};
diff --git a/alc/backends/base.h b/alc/backends/base.h
index 07a91e25..853df893 100644
--- a/alc/backends/base.h
+++ b/alc/backends/base.h
@@ -30,9 +30,9 @@ struct BackendBase {
virtual ClockLatency getClockLatency();
- ALCdevice *const mDevice;
+ DeviceBase *const mDevice;
- BackendBase(ALCdevice *device) noexcept : mDevice{device} { }
+ BackendBase(DeviceBase *device) noexcept : mDevice{device} { }
virtual ~BackendBase() = default;
protected:
@@ -57,7 +57,7 @@ enum class BackendType {
/* Helper to get the current clock time from the device's ClockBase, and
* SamplesDone converted from the sample rate.
*/
-inline std::chrono::nanoseconds GetDeviceClockTime(ALCdevice *device)
+inline std::chrono::nanoseconds GetDeviceClockTime(DeviceBase *device)
{
using std::chrono::seconds;
using std::chrono::nanoseconds;
@@ -69,7 +69,7 @@ inline std::chrono::nanoseconds GetDeviceClockTime(ALCdevice *device)
/* Helper to get the device latency from the backend, including any fixed
* latency from post-processing.
*/
-inline ClockLatency GetClockLatency(ALCdevice *device)
+inline ClockLatency GetClockLatency(DeviceBase *device)
{
BackendBase *backend{device->Backend.get()};
ClockLatency ret{backend->getClockLatency()};
@@ -85,7 +85,7 @@ struct BackendFactory {
virtual std::string probe(BackendType type) = 0;
- virtual BackendPtr createBackend(ALCdevice *device, BackendType type) = 0;
+ virtual BackendPtr createBackend(DeviceBase *device, BackendType type) = 0;
protected:
virtual ~BackendFactory() = default;
diff --git a/alc/backends/coreaudio.cpp b/alc/backends/coreaudio.cpp
index 0dd8e766..45c814bf 100644
--- a/alc/backends/coreaudio.cpp
+++ b/alc/backends/coreaudio.cpp
@@ -47,7 +47,7 @@ static const char ca_device[] = "CoreAudio Default";
struct CoreAudioPlayback final : public BackendBase {
- CoreAudioPlayback(ALCdevice *device) noexcept : BackendBase{device} { }
+ CoreAudioPlayback(DeviceBase *device) noexcept : BackendBase{device} { }
~CoreAudioPlayback() override;
OSStatus MixerProc(AudioUnitRenderActionFlags *ioActionFlags,
@@ -304,7 +304,7 @@ void CoreAudioPlayback::stop()
struct CoreAudioCapture final : public BackendBase {
- CoreAudioCapture(ALCdevice *device) noexcept : BackendBase{device} { }
+ CoreAudioCapture(DeviceBase *device) noexcept : BackendBase{device} { }
~CoreAudioCapture() override;
OSStatus RecordProc(AudioUnitRenderActionFlags *ioActionFlags,
@@ -686,7 +686,7 @@ std::string CoreAudioBackendFactory::probe(BackendType type)
return outnames;
}
-BackendPtr CoreAudioBackendFactory::createBackend(ALCdevice *device, BackendType type)
+BackendPtr CoreAudioBackendFactory::createBackend(DeviceBase *device, BackendType type)
{
if(type == BackendType::Playback)
return BackendPtr{new CoreAudioPlayback{device}};
diff --git a/alc/backends/coreaudio.h b/alc/backends/coreaudio.h
index 16957806..19e50eab 100644
--- a/alc/backends/coreaudio.h
+++ b/alc/backends/coreaudio.h
@@ -11,7 +11,7 @@ public:
std::string probe(BackendType type) override;
- BackendPtr createBackend(ALCdevice *device, BackendType type) override;
+ BackendPtr createBackend(DeviceBase *device, BackendType type) override;
static BackendFactory &getFactory();
};
diff --git a/alc/backends/dsound.cpp b/alc/backends/dsound.cpp
index 3c6c5615..928ff507 100644
--- a/alc/backends/dsound.cpp
+++ b/alc/backends/dsound.cpp
@@ -170,7 +170,7 @@ BOOL CALLBACK DSoundEnumDevices(GUID *guid, const WCHAR *desc, const WCHAR*, voi
struct DSoundPlayback final : public BackendBase {
- DSoundPlayback(ALCdevice *device) noexcept : BackendBase{device} { }
+ DSoundPlayback(DeviceBase *device) noexcept : BackendBase{device} { }
~DSoundPlayback() override;
int mixerProc();
@@ -548,7 +548,7 @@ void DSoundPlayback::stop()
struct DSoundCapture final : public BackendBase {
- DSoundCapture(ALCdevice *device) noexcept : BackendBase{device} { }
+ DSoundCapture(DeviceBase *device) noexcept : BackendBase{device} { }
~DSoundCapture() override;
void open(const char *name) override;
@@ -840,7 +840,7 @@ std::string DSoundBackendFactory::probe(BackendType type)
return outnames;
}
-BackendPtr DSoundBackendFactory::createBackend(ALCdevice *device, BackendType type)
+BackendPtr DSoundBackendFactory::createBackend(DeviceBase *device, BackendType type)
{
if(type == BackendType::Playback)
return BackendPtr{new DSoundPlayback{device}};
diff --git a/alc/backends/dsound.h b/alc/backends/dsound.h
index 83f7d5c7..3b5b344b 100644
--- a/alc/backends/dsound.h
+++ b/alc/backends/dsound.h
@@ -11,7 +11,7 @@ public:
std::string probe(BackendType type) override;
- BackendPtr createBackend(ALCdevice *device, BackendType type) override;
+ BackendPtr createBackend(DeviceBase *device, BackendType type) override;
static BackendFactory &getFactory();
};
diff --git a/alc/backends/jack.cpp b/alc/backends/jack.cpp
index fe86f08c..b7b35217 100644
--- a/alc/backends/jack.cpp
+++ b/alc/backends/jack.cpp
@@ -236,7 +236,7 @@ void EnumerateDevices(jack_client_t *client, al::vector<DeviceEntry> &list)
struct JackPlayback final : public BackendBase {
- JackPlayback(ALCdevice *device) noexcept : BackendBase{device} { }
+ JackPlayback(DeviceBase *device) noexcept : BackendBase{device} { }
~JackPlayback() override;
int process(jack_nframes_t numframes) noexcept;
@@ -637,7 +637,7 @@ std::string JackBackendFactory::probe(BackendType type)
return outnames;
}
-BackendPtr JackBackendFactory::createBackend(ALCdevice *device, BackendType type)
+BackendPtr JackBackendFactory::createBackend(DeviceBase *device, BackendType type)
{
if(type == BackendType::Playback)
return BackendPtr{new JackPlayback{device}};
diff --git a/alc/backends/jack.h b/alc/backends/jack.h
index f966c8f0..6f81a209 100644
--- a/alc/backends/jack.h
+++ b/alc/backends/jack.h
@@ -11,7 +11,7 @@ public:
std::string probe(BackendType type) override;
- BackendPtr createBackend(ALCdevice *device, BackendType type) override;
+ BackendPtr createBackend(DeviceBase *device, BackendType type) override;
static BackendFactory &getFactory();
};
diff --git a/alc/backends/loopback.cpp b/alc/backends/loopback.cpp
index 7f421ea7..bafe8cc8 100644
--- a/alc/backends/loopback.cpp
+++ b/alc/backends/loopback.cpp
@@ -29,7 +29,7 @@
namespace {
struct LoopbackBackend final : public BackendBase {
- LoopbackBackend(ALCdevice *device) noexcept : BackendBase{device} { }
+ LoopbackBackend(DeviceBase *device) noexcept : BackendBase{device} { }
void open(const ALCchar *name) override;
bool reset() override;
@@ -69,7 +69,7 @@ bool LoopbackBackendFactory::querySupport(BackendType)
std::string LoopbackBackendFactory::probe(BackendType)
{ return std::string{}; }
-BackendPtr LoopbackBackendFactory::createBackend(ALCdevice *device, BackendType)
+BackendPtr LoopbackBackendFactory::createBackend(DeviceBase *device, BackendType)
{ return BackendPtr{new LoopbackBackend{device}}; }
BackendFactory &LoopbackBackendFactory::getFactory()
diff --git a/alc/backends/loopback.h b/alc/backends/loopback.h
index d000e033..1a031a1f 100644
--- a/alc/backends/loopback.h
+++ b/alc/backends/loopback.h
@@ -11,7 +11,7 @@ public:
std::string probe(BackendType type) override;
- BackendPtr createBackend(ALCdevice *device, BackendType type) override;
+ BackendPtr createBackend(DeviceBase *device, BackendType type) override;
static BackendFactory &getFactory();
};
diff --git a/alc/backends/null.cpp b/alc/backends/null.cpp
index d3dfc3a4..763d4d2e 100644
--- a/alc/backends/null.cpp
+++ b/alc/backends/null.cpp
@@ -47,7 +47,7 @@ constexpr char nullDevice[] = "No Output";
struct NullBackend final : public BackendBase {
- NullBackend(ALCdevice *device) noexcept : BackendBase{device} { }
+ NullBackend(DeviceBase *device) noexcept : BackendBase{device} { }
int mixerProc();
@@ -166,7 +166,7 @@ std::string NullBackendFactory::probe(BackendType type)
return outnames;
}
-BackendPtr NullBackendFactory::createBackend(ALCdevice *device, BackendType type)
+BackendPtr NullBackendFactory::createBackend(DeviceBase *device, BackendType type)
{
if(type == BackendType::Playback)
return BackendPtr{new NullBackend{device}};
diff --git a/alc/backends/null.h b/alc/backends/null.h
index 8e9c59e5..c9d1b3b3 100644
--- a/alc/backends/null.h
+++ b/alc/backends/null.h
@@ -11,7 +11,7 @@ public:
std::string probe(BackendType type) override;
- BackendPtr createBackend(ALCdevice *device, BackendType type) override;
+ BackendPtr createBackend(DeviceBase *device, BackendType type) override;
static BackendFactory &getFactory();
};
diff --git a/alc/backends/oboe.cpp b/alc/backends/oboe.cpp
index b94a0882..d82db834 100644
--- a/alc/backends/oboe.cpp
+++ b/alc/backends/oboe.cpp
@@ -18,7 +18,7 @@ constexpr char device_name[] = "Oboe Default";
struct OboePlayback final : public BackendBase, public oboe::AudioStreamCallback {
- OboePlayback(ALCdevice *device) : BackendBase{device} { }
+ OboePlayback(DeviceBase *device) : BackendBase{device} { }
oboe::ManagedStream mStream;
@@ -221,7 +221,7 @@ void OboePlayback::stop()
struct OboeCapture final : public BackendBase {
- OboeCapture(ALCdevice *device) : BackendBase{device} { }
+ OboeCapture(DeviceBase *device) : BackendBase{device} { }
oboe::ManagedStream mStream;
@@ -368,7 +368,7 @@ std::string OboeBackendFactory::probe(BackendType type)
return std::string{};
}
-BackendPtr OboeBackendFactory::createBackend(ALCdevice *device, BackendType type)
+BackendPtr OboeBackendFactory::createBackend(DeviceBase *device, BackendType type)
{
if(type == BackendType::Playback)
return BackendPtr{new OboePlayback{device}};
diff --git a/alc/backends/oboe.h b/alc/backends/oboe.h
index 93b98e37..228ec807 100644
--- a/alc/backends/oboe.h
+++ b/alc/backends/oboe.h
@@ -11,7 +11,7 @@ public:
std::string probe(BackendType type) override;
- BackendPtr createBackend(ALCdevice *device, BackendType type) override;
+ BackendPtr createBackend(DeviceBase *device, BackendType type) override;
static BackendFactory &getFactory();
};
diff --git a/alc/backends/opensl.cpp b/alc/backends/opensl.cpp
index 8e5c2783..af656470 100644
--- a/alc/backends/opensl.cpp
+++ b/alc/backends/opensl.cpp
@@ -151,7 +151,7 @@ const char *res_str(SLresult result) noexcept
struct OpenSLPlayback final : public BackendBase {
- OpenSLPlayback(ALCdevice *device) noexcept : BackendBase{device} { }
+ OpenSLPlayback(DeviceBase *device) noexcept : BackendBase{device} { }
~OpenSLPlayback() override;
void process(SLAndroidSimpleBufferQueueItf bq) noexcept;
@@ -632,7 +632,7 @@ ClockLatency OpenSLPlayback::getClockLatency()
struct OpenSLCapture final : public BackendBase {
- OpenSLCapture(ALCdevice *device) noexcept : BackendBase{device} { }
+ OpenSLCapture(DeviceBase *device) noexcept : BackendBase{device} { }
~OpenSLCapture() override;
void process(SLAndroidSimpleBufferQueueItf bq) noexcept;
@@ -962,7 +962,7 @@ std::string OSLBackendFactory::probe(BackendType type)
return outnames;
}
-BackendPtr OSLBackendFactory::createBackend(ALCdevice *device, BackendType type)
+BackendPtr OSLBackendFactory::createBackend(DeviceBase *device, BackendType type)
{
if(type == BackendType::Playback)
return BackendPtr{new OpenSLPlayback{device}};
diff --git a/alc/backends/opensl.h b/alc/backends/opensl.h
index b1c5cf5a..36586bbb 100644
--- a/alc/backends/opensl.h
+++ b/alc/backends/opensl.h
@@ -11,7 +11,7 @@ public:
std::string probe(BackendType type) override;
- BackendPtr createBackend(ALCdevice *device, BackendType type) override;
+ BackendPtr createBackend(DeviceBase *device, BackendType type) override;
static BackendFactory &getFactory();
};
diff --git a/alc/backends/oss.cpp b/alc/backends/oss.cpp
index 22289b74..d769a1eb 100644
--- a/alc/backends/oss.cpp
+++ b/alc/backends/oss.cpp
@@ -227,7 +227,7 @@ uint log2i(uint x)
struct OSSPlayback final : public BackendBase {
- OSSPlayback(ALCdevice *device) noexcept : BackendBase{device} { }
+ OSSPlayback(DeviceBase *device) noexcept : BackendBase{device} { }
~OSSPlayback() override;
int mixerProc();
@@ -443,7 +443,7 @@ void OSSPlayback::stop()
struct OSScapture final : public BackendBase {
- OSScapture(ALCdevice *device) noexcept : BackendBase{device} { }
+ OSScapture(DeviceBase *device) noexcept : BackendBase{device} { }
~OSScapture() override;
int recordProc();
@@ -681,7 +681,7 @@ std::string OSSBackendFactory::probe(BackendType type)
return outnames;
}
-BackendPtr OSSBackendFactory::createBackend(ALCdevice *device, BackendType type)
+BackendPtr OSSBackendFactory::createBackend(DeviceBase *device, BackendType type)
{
if(type == BackendType::Playback)
return BackendPtr{new OSSPlayback{device}};
diff --git a/alc/backends/oss.h b/alc/backends/oss.h
index dd92efc3..798da456 100644
--- a/alc/backends/oss.h
+++ b/alc/backends/oss.h
@@ -11,7 +11,7 @@ public:
std::string probe(BackendType type) override;
- BackendPtr createBackend(ALCdevice *device, BackendType type) override;
+ BackendPtr createBackend(DeviceBase *device, BackendType type) override;
static BackendFactory &getFactory();
};
diff --git a/alc/backends/portaudio.cpp b/alc/backends/portaudio.cpp
index 188f72f2..8f41b12a 100644
--- a/alc/backends/portaudio.cpp
+++ b/alc/backends/portaudio.cpp
@@ -72,7 +72,7 @@ MAKE_FUNC(Pa_GetStreamInfo);
struct PortPlayback final : public BackendBase {
- PortPlayback(ALCdevice *device) noexcept : BackendBase{device} { }
+ PortPlayback(DeviceBase *device) noexcept : BackendBase{device} { }
~PortPlayback() override;
int writeCallback(const void *inputBuffer, void *outputBuffer, unsigned long framesPerBuffer,
@@ -231,7 +231,7 @@ void PortPlayback::stop()
struct PortCapture final : public BackendBase {
- PortCapture(ALCdevice *device) noexcept : BackendBase{device} { }
+ PortCapture(DeviceBase *device) noexcept : BackendBase{device} { }
~PortCapture() override;
int readCallback(const void *inputBuffer, void *outputBuffer, unsigned long framesPerBuffer,
@@ -431,7 +431,7 @@ std::string PortBackendFactory::probe(BackendType type)
return outnames;
}
-BackendPtr PortBackendFactory::createBackend(ALCdevice *device, BackendType type)
+BackendPtr PortBackendFactory::createBackend(DeviceBase *device, BackendType type)
{
if(type == BackendType::Playback)
return BackendPtr{new PortPlayback{device}};
diff --git a/alc/backends/portaudio.h b/alc/backends/portaudio.h
index 9dbd6b94..34bb8d1b 100644
--- a/alc/backends/portaudio.h
+++ b/alc/backends/portaudio.h
@@ -11,7 +11,7 @@ public:
std::string probe(BackendType type) override;
- BackendPtr createBackend(ALCdevice *device, BackendType type) override;
+ BackendPtr createBackend(DeviceBase *device, BackendType type) override;
static BackendFactory &getFactory();
};
diff --git a/alc/backends/pulseaudio.cpp b/alc/backends/pulseaudio.cpp
index bf3fc18e..39eed771 100644
--- a/alc/backends/pulseaudio.cpp
+++ b/alc/backends/pulseaudio.cpp
@@ -282,7 +282,7 @@ al::optional<Channel> ChannelFromPulse(pa_channel_position_t chan)
return al::nullopt;
}
-void SetChannelOrderFromMap(ALCdevice *device, const pa_channel_map &chanmap)
+void SetChannelOrderFromMap(DeviceBase *device, const pa_channel_map &chanmap)
{
device->RealOut.ChannelIndex.fill(INVALID_CHANNEL_INDEX);
for(uint i{0};i < chanmap.channels;++i)
@@ -655,7 +655,7 @@ PulseMainloop gGlobalMainloop;
struct PulsePlayback final : public BackendBase {
- PulsePlayback(ALCdevice *device) noexcept : BackendBase{device} { }
+ PulsePlayback(DeviceBase *device) noexcept : BackendBase{device} { }
~PulsePlayback() override;
void bufferAttrCallback(pa_stream *stream) noexcept;
@@ -1108,7 +1108,7 @@ ClockLatency PulsePlayback::getClockLatency()
struct PulseCapture final : public BackendBase {
- PulseCapture(ALCdevice *device) noexcept : BackendBase{device} { }
+ PulseCapture(DeviceBase *device) noexcept : BackendBase{device} { }
~PulseCapture() override;
void streamStateCallback(pa_stream *stream) noexcept;
@@ -1510,7 +1510,7 @@ std::string PulseBackendFactory::probe(BackendType type)
return outnames;
}
-BackendPtr PulseBackendFactory::createBackend(ALCdevice *device, BackendType type)
+BackendPtr PulseBackendFactory::createBackend(DeviceBase *device, BackendType type)
{
if(type == BackendType::Playback)
return BackendPtr{new PulsePlayback{device}};
diff --git a/alc/backends/pulseaudio.h b/alc/backends/pulseaudio.h
index 86b81502..60ebbc36 100644
--- a/alc/backends/pulseaudio.h
+++ b/alc/backends/pulseaudio.h
@@ -11,7 +11,7 @@ public:
std::string probe(BackendType type) override;
- BackendPtr createBackend(ALCdevice *device, BackendType type) override;
+ BackendPtr createBackend(DeviceBase *device, BackendType type) override;
static BackendFactory &getFactory();
};
diff --git a/alc/backends/sdl2.cpp b/alc/backends/sdl2.cpp
index 4c4c71ed..800ae935 100644
--- a/alc/backends/sdl2.cpp
+++ b/alc/backends/sdl2.cpp
@@ -46,7 +46,7 @@ namespace {
constexpr char defaultDeviceName[] = DEVNAME_PREFIX "Default Device";
struct Sdl2Backend final : public BackendBase {
- Sdl2Backend(ALCdevice *device) noexcept : BackendBase{device} { }
+ Sdl2Backend(DeviceBase *device) noexcept : BackendBase{device} { }
~Sdl2Backend() override;
void audioCallback(Uint8 *stream, int len) noexcept;
@@ -213,7 +213,7 @@ std::string SDL2BackendFactory::probe(BackendType type)
return outnames;
}
-BackendPtr SDL2BackendFactory::createBackend(ALCdevice *device, BackendType type)
+BackendPtr SDL2BackendFactory::createBackend(DeviceBase *device, BackendType type)
{
if(type == BackendType::Playback)
return BackendPtr{new Sdl2Backend{device}};
diff --git a/alc/backends/sdl2.h b/alc/backends/sdl2.h
index ce79d52e..3844b8bf 100644
--- a/alc/backends/sdl2.h
+++ b/alc/backends/sdl2.h
@@ -11,7 +11,7 @@ public:
std::string probe(BackendType type) override;
- BackendPtr createBackend(ALCdevice *device, BackendType type) override;
+ BackendPtr createBackend(DeviceBase *device, BackendType type) override;
static BackendFactory &getFactory();
};
diff --git a/alc/backends/sndio.cpp b/alc/backends/sndio.cpp
index 35b7e6c8..c7c42210 100644
--- a/alc/backends/sndio.cpp
+++ b/alc/backends/sndio.cpp
@@ -46,7 +46,7 @@ static const char sndio_device[] = "SndIO Default";
struct SndioPlayback final : public BackendBase {
- SndioPlayback(ALCdevice *device) noexcept : BackendBase{device} { }
+ SndioPlayback(DeviceBase *device) noexcept : BackendBase{device} { }
~SndioPlayback() override;
int mixerProc();
@@ -293,7 +293,7 @@ void SndioPlayback::stop()
struct SndioCapture final : public BackendBase {
- SndioCapture(ALCdevice *device) noexcept : BackendBase{device} { }
+ SndioCapture(DeviceBase *device) noexcept : BackendBase{device} { }
~SndioCapture() override;
int recordProc();
@@ -512,7 +512,7 @@ std::string SndIOBackendFactory::probe(BackendType type)
return outnames;
}
-BackendPtr SndIOBackendFactory::createBackend(ALCdevice *device, BackendType type)
+BackendPtr SndIOBackendFactory::createBackend(DeviceBase *device, BackendType type)
{
if(type == BackendType::Playback)
return BackendPtr{new SndioPlayback{device}};
diff --git a/alc/backends/sndio.h b/alc/backends/sndio.h
index 83d02906..9b93199f 100644
--- a/alc/backends/sndio.h
+++ b/alc/backends/sndio.h
@@ -11,7 +11,7 @@ public:
std::string probe(BackendType type) override;
- BackendPtr createBackend(ALCdevice *device, BackendType type) override;
+ BackendPtr createBackend(DeviceBase *device, BackendType type) override;
static BackendFactory &getFactory();
};
diff --git a/alc/backends/solaris.cpp b/alc/backends/solaris.cpp
index 7739cba7..20414543 100644
--- a/alc/backends/solaris.cpp
+++ b/alc/backends/solaris.cpp
@@ -59,7 +59,7 @@ std::string solaris_driver{"/dev/audio"};
struct SolarisBackend final : public BackendBase {
- SolarisBackend(ALCdevice *device) noexcept : BackendBase{device} { }
+ SolarisBackend(DeviceBase *device) noexcept : BackendBase{device} { }
~SolarisBackend() override;
int mixerProc();
@@ -295,7 +295,7 @@ std::string SolarisBackendFactory::probe(BackendType type)
return outnames;
}
-BackendPtr SolarisBackendFactory::createBackend(ALCdevice *device, BackendType type)
+BackendPtr SolarisBackendFactory::createBackend(DeviceBase *device, BackendType type)
{
if(type == BackendType::Playback)
return BackendPtr{new SolarisBackend{device}};
diff --git a/alc/backends/solaris.h b/alc/backends/solaris.h
index 4a9e505b..4e80cf9a 100644
--- a/alc/backends/solaris.h
+++ b/alc/backends/solaris.h
@@ -11,7 +11,7 @@ public:
std::string probe(BackendType type) override;
- BackendPtr createBackend(ALCdevice *device, BackendType type) override;
+ BackendPtr createBackend(DeviceBase *device, BackendType type) override;
static BackendFactory &getFactory();
};
diff --git a/alc/backends/wasapi.cpp b/alc/backends/wasapi.cpp
index 76c6d009..114c69e0 100644
--- a/alc/backends/wasapi.cpp
+++ b/alc/backends/wasapi.cpp
@@ -627,7 +627,7 @@ int WasapiProxy::messageHandler(std::promise<HRESULT> *promise)
struct WasapiPlayback final : public BackendBase, WasapiProxy {
- WasapiPlayback(ALCdevice *device) noexcept : BackendBase{device} { }
+ WasapiPlayback(DeviceBase *device) noexcept : BackendBase{device} { }
~WasapiPlayback() override;
int mixerProc();
@@ -1160,7 +1160,7 @@ ClockLatency WasapiPlayback::getClockLatency()
struct WasapiCapture final : public BackendBase, WasapiProxy {
- WasapiCapture(ALCdevice *device) noexcept : BackendBase{device} { }
+ WasapiCapture(DeviceBase *device) noexcept : BackendBase{device} { }
~WasapiCapture() override;
int recordProc();
@@ -1492,7 +1492,7 @@ HRESULT WasapiCapture::resetProxy()
CoTaskMemFree(wfx);
wfx = nullptr;
- auto validate_fmt = [](ALCdevice *device, uint32_t chancount, DWORD chanmask) noexcept
+ auto validate_fmt = [](DeviceBase *device, uint32_t chancount, DWORD chanmask) noexcept
-> bool
{
switch(device->FmtChans)
@@ -1757,7 +1757,7 @@ std::string WasapiBackendFactory::probe(BackendType type)
return outnames;
}
-BackendPtr WasapiBackendFactory::createBackend(ALCdevice *device, BackendType type)
+BackendPtr WasapiBackendFactory::createBackend(DeviceBase *device, BackendType type)
{
if(type == BackendType::Playback)
return BackendPtr{new WasapiPlayback{device}};
diff --git a/alc/backends/wasapi.h b/alc/backends/wasapi.h
index 97143c1a..fa4b811e 100644
--- a/alc/backends/wasapi.h
+++ b/alc/backends/wasapi.h
@@ -11,7 +11,7 @@ public:
std::string probe(BackendType type) override;
- BackendPtr createBackend(ALCdevice *device, BackendType type) override;
+ BackendPtr createBackend(DeviceBase *device, BackendType type) override;
static BackendFactory &getFactory();
};
diff --git a/alc/backends/wave.cpp b/alc/backends/wave.cpp
index 00ff6ec6..434a5fb1 100644
--- a/alc/backends/wave.cpp
+++ b/alc/backends/wave.cpp
@@ -93,7 +93,7 @@ void fwrite32le(uint val, FILE *f)
struct WaveBackend final : public BackendBase {
- WaveBackend(ALCdevice *device) noexcept : BackendBase{device} { }
+ WaveBackend(DeviceBase *device) noexcept : BackendBase{device} { }
~WaveBackend() override;
int mixerProc();
@@ -395,7 +395,7 @@ std::string WaveBackendFactory::probe(BackendType type)
return outnames;
}
-BackendPtr WaveBackendFactory::createBackend(ALCdevice *device, BackendType type)
+BackendPtr WaveBackendFactory::createBackend(DeviceBase *device, BackendType type)
{
if(type == BackendType::Playback)
return BackendPtr{new WaveBackend{device}};
diff --git a/alc/backends/wave.h b/alc/backends/wave.h
index 5719961f..926e2198 100644
--- a/alc/backends/wave.h
+++ b/alc/backends/wave.h
@@ -11,7 +11,7 @@ public:
std::string probe(BackendType type) override;
- BackendPtr createBackend(ALCdevice *device, BackendType type) override;
+ BackendPtr createBackend(DeviceBase *device, BackendType type) override;
static BackendFactory &getFactory();
};
diff --git a/alc/backends/winmm.cpp b/alc/backends/winmm.cpp
index 693c4664..c346a828 100644
--- a/alc/backends/winmm.cpp
+++ b/alc/backends/winmm.cpp
@@ -125,7 +125,7 @@ void ProbeCaptureDevices(void)
struct WinMMPlayback final : public BackendBase {
- WinMMPlayback(ALCdevice *device) noexcept : BackendBase{device} { }
+ WinMMPlayback(DeviceBase *device) noexcept : BackendBase{device} { }
~WinMMPlayback() override;
void CALLBACK waveOutProc(HWAVEOUT device, UINT msg, DWORD_PTR param1, DWORD_PTR param2) noexcept;
@@ -370,7 +370,7 @@ void WinMMPlayback::stop()
struct WinMMCapture final : public BackendBase {
- WinMMCapture(ALCdevice *device) noexcept : BackendBase{device} { }
+ WinMMCapture(DeviceBase *device) noexcept : BackendBase{device} { }
~WinMMCapture() override;
void CALLBACK waveInProc(HWAVEIN device, UINT msg, DWORD_PTR param1, DWORD_PTR param2) noexcept;
@@ -621,7 +621,7 @@ std::string WinMMBackendFactory::probe(BackendType type)
return outnames;
}
-BackendPtr WinMMBackendFactory::createBackend(ALCdevice *device, BackendType type)
+BackendPtr WinMMBackendFactory::createBackend(DeviceBase *device, BackendType type)
{
if(type == BackendType::Playback)
return BackendPtr{new WinMMPlayback{device}};
diff --git a/alc/backends/winmm.h b/alc/backends/winmm.h
index bf09ddd9..a376b8a4 100644
--- a/alc/backends/winmm.h
+++ b/alc/backends/winmm.h
@@ -11,7 +11,7 @@ public:
std::string probe(BackendType type) override;
- BackendPtr createBackend(ALCdevice *device, BackendType type) override;
+ BackendPtr createBackend(DeviceBase *device, BackendType type) override;
static BackendFactory &getFactory();
};