diff --git a/pcsx2/USB/usb-mic/audiodev-cubeb.cpp b/pcsx2/USB/usb-mic/audiodev-cubeb.cpp index 5a5a42ad49..c032552fe7 100644 --- a/pcsx2/USB/usb-mic/audiodev-cubeb.cpp +++ b/pcsx2/USB/usb-mic/audiodev-cubeb.cpp @@ -85,8 +85,8 @@ namespace usb_mic { namespace audiodev_cubeb { - CubebAudioDevice::CubebAudioDevice(u32 port, AudioDir dir, u32 channels, std::string devname, s32 latency) - : AudioDevice(port, dir, channels) + CubebAudioDevice::CubebAudioDevice(AudioDir dir, u32 channels, std::string devname, s32 latency) + : AudioDevice(dir, channels) , mLatency(latency) , mDeviceName(std::move(devname)) { diff --git a/pcsx2/USB/usb-mic/audiodev-cubeb.h b/pcsx2/USB/usb-mic/audiodev-cubeb.h index db73bcaf67..2005f1ace7 100644 --- a/pcsx2/USB/usb-mic/audiodev-cubeb.h +++ b/pcsx2/USB/usb-mic/audiodev-cubeb.h @@ -19,7 +19,7 @@ namespace usb_mic class CubebAudioDevice final : public AudioDevice { public: - CubebAudioDevice(u32 port, AudioDir dir, u32 channels, std::string devname, s32 latency); + CubebAudioDevice(AudioDir dir, u32 channels, std::string devname, s32 latency); ~CubebAudioDevice(); static std::vector> GetDeviceList(bool input); diff --git a/pcsx2/USB/usb-mic/audiodev-noop.h b/pcsx2/USB/usb-mic/audiodev-noop.h index b93ad61225..756ad07938 100644 --- a/pcsx2/USB/usb-mic/audiodev-noop.h +++ b/pcsx2/USB/usb-mic/audiodev-noop.h @@ -12,9 +12,8 @@ namespace usb_mic class NoopAudioDevice : public AudioDevice { public: - NoopAudioDevice( - u32 port, AudioDir dir, u32 channels) - : AudioDevice(port, dir, channels) + NoopAudioDevice(AudioDir dir, u32 channels) + : AudioDevice(dir, channels) { } ~NoopAudioDevice() override {} diff --git a/pcsx2/USB/usb-mic/audiodev.h b/pcsx2/USB/usb-mic/audiodev.h index 415aa08e82..387b10a750 100644 --- a/pcsx2/USB/usb-mic/audiodev.h +++ b/pcsx2/USB/usb-mic/audiodev.h @@ -34,15 +34,13 @@ public: static constexpr s32 DEFAULT_LATENCY = 100; static constexpr const char* DEFAULT_LATENCY_STR = "100"; - AudioDevice(u32 port, AudioDir dir, u32 channels) - : mPort(port) - , mAudioDir(dir) + AudioDevice(AudioDir dir, u32 channels) + : mAudioDir(dir) , mChannels(channels) { } protected: - u32 mPort; s32 mSubDevice; AudioDir mAudioDir; u32 mChannels; @@ -64,8 +62,8 @@ public: virtual bool Start() = 0; virtual void Stop() = 0; - static std::unique_ptr CreateDevice(u32 port, AudioDir dir, u32 channels, std::string devname, s32 latency); - static std::unique_ptr CreateNoopDevice(u32 port, AudioDir dir, u32 channels); + static std::unique_ptr CreateDevice(AudioDir dir, u32 channels, std::string devname, s32 latency); + static std::unique_ptr CreateNoopDevice(AudioDir dir, u32 channels); static std::vector> GetInputDeviceList(); static std::vector> GetOutputDeviceList(); }; diff --git a/pcsx2/USB/usb-mic/usb-headset.cpp b/pcsx2/USB/usb-mic/usb-headset.cpp index f76051ebd3..53090bc644 100644 --- a/pcsx2/USB/usb-mic/usb-headset.cpp +++ b/pcsx2/USB/usb-mic/usb-headset.cpp @@ -898,14 +898,14 @@ namespace usb_mic const s32 output_latency = USB::GetConfigInt(si, port, TypeName(), "output_latency", AudioDevice::DEFAULT_LATENCY); if (!input_devname.empty()) - s->audsrc = AudioDevice::CreateDevice(port, AUDIODIR_SOURCE, 1, std::move(input_devname), input_latency); + s->audsrc = AudioDevice::CreateDevice(AUDIODIR_SOURCE, 1, std::move(input_devname), input_latency); else - s->audsrc = AudioDevice::CreateNoopDevice(port, AUDIODIR_SOURCE, 1); + s->audsrc = AudioDevice::CreateNoopDevice(AUDIODIR_SOURCE, 1); if (!output_devname.empty()) - s->audsink = AudioDevice::CreateDevice(port, AUDIODIR_SINK, 2, std::move(output_devname), output_latency); + s->audsink = AudioDevice::CreateDevice(AUDIODIR_SINK, 2, std::move(output_devname), output_latency); else - s->audsink = AudioDevice::CreateNoopDevice(port, AUDIODIR_SINK, 2); + s->audsink = AudioDevice::CreateNoopDevice(AUDIODIR_SINK, 2); s->f.mode = MIC_MODE_SINGLE; diff --git a/pcsx2/USB/usb-mic/usb-mic-singstar.cpp b/pcsx2/USB/usb-mic/usb-mic-singstar.cpp index 83929f19ca..837aefa1a0 100644 --- a/pcsx2/USB/usb-mic/usb-mic-singstar.cpp +++ b/pcsx2/USB/usb-mic/usb-mic-singstar.cpp @@ -720,11 +720,11 @@ namespace usb_mic { // Try to open a single device with two channels. This might not work if it's only a mono mic. Console.WriteLn("USB-Mic: Trying to open stereo single source dual mic: '%s'", dev0.c_str()); - s->audsrc[0] = AudioDevice::CreateDevice(port, AUDIODIR_SOURCE, 2, dev0, latency); + s->audsrc[0] = AudioDevice::CreateDevice(AUDIODIR_SOURCE, 2, dev0, latency); if (!s->audsrc[0]) { Console.Error("USB-Mic: Failed to get stereo source, mic '%s' might only be mono", dev0.c_str()); - s->audsrc[0] = AudioDevice::CreateDevice(port, AUDIODIR_SOURCE, 1, std::move(dev0), latency); + s->audsrc[0] = AudioDevice::CreateDevice(AUDIODIR_SOURCE, 1, std::move(dev0), latency); } s->f.mode = MIC_MODE_SHARED; @@ -732,9 +732,9 @@ namespace usb_mic else { if (!dev0.empty()) - s->audsrc[0] = AudioDevice::CreateDevice(port, AUDIODIR_SOURCE, 1, std::move(dev0), latency); + s->audsrc[0] = AudioDevice::CreateDevice(AUDIODIR_SOURCE, 1, std::move(dev0), latency); if (!dev1.empty()) - s->audsrc[1] = AudioDevice::CreateDevice(port, AUDIODIR_SOURCE, 1, std::move(dev1), latency); + s->audsrc[1] = AudioDevice::CreateDevice(AUDIODIR_SOURCE, 1, std::move(dev1), latency); s->f.mode = (s->audsrc[0] && s->audsrc[1]) ? MIC_MODE_SEPARATE : MIC_MODE_SINGLE; } @@ -744,7 +744,7 @@ namespace usb_mic std::string dev0(USB::GetConfigString(si, port, devtype, "input_device_name")); const s32 latency0 = USB::GetConfigInt(si, port, devtype, "input_latency", AudioDevice::DEFAULT_LATENCY); if (!dev0.empty()) - s->audsrc[0] = AudioDevice::CreateDevice(port, AUDIODIR_SOURCE, 1, std::move(dev0), latency0); + s->audsrc[0] = AudioDevice::CreateDevice(AUDIODIR_SOURCE, 1, std::move(dev0), latency0); s->f.mode = MIC_MODE_SINGLE; } @@ -890,14 +890,14 @@ namespace usb_mic } } // namespace usb_mic -std::unique_ptr AudioDevice::CreateNoopDevice(u32 port, AudioDir dir, u32 channels) +std::unique_ptr AudioDevice::CreateNoopDevice(AudioDir dir, u32 channels) { - return std::make_unique(port, dir, channels); + return std::make_unique(dir, channels); } -std::unique_ptr AudioDevice::CreateDevice(u32 port, AudioDir dir, u32 channels, std::string devname, s32 latency) +std::unique_ptr AudioDevice::CreateDevice(AudioDir dir, u32 channels, std::string devname, s32 latency) { - return std::make_unique(port, dir, channels, std::move(devname), latency); + return std::make_unique(dir, channels, std::move(devname), latency); } std::vector> AudioDevice::GetInputDeviceList()