From 66101f86280adc548c013a9a9028b1c7f8e1ab4c Mon Sep 17 00:00:00 2001 From: refractionpcsx2 Date: Fri, 15 Apr 2022 23:13:04 +0100 Subject: [PATCH] SPU2: Clean up warnings --- pcsx2/SPU2/Dma.cpp | 2 +- pcsx2/SPU2/ReadInput.cpp | 4 ++-- pcsx2/SPU2/defs.h | 4 ++-- pcsx2/SPU2/spu2freeze.cpp | 4 ++-- pcsx2/SPU2/spu2sys.cpp | 4 ++-- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/pcsx2/SPU2/Dma.cpp b/pcsx2/SPU2/Dma.cpp index bf77d1db17..50f346ae3c 100644 --- a/pcsx2/SPU2/Dma.cpp +++ b/pcsx2/SPU2/Dma.cpp @@ -98,7 +98,7 @@ void V_Core::LogAutoDMA(FILE* fp) void V_Core::AutoDMAReadBuffer(int mode) //mode: 0= split stereo; 1 = do not split stereo { - int spos = InputPosWrite & 0x100; // Starting position passed by TSA + u32 spos = InputPosWrite & 0x100; // Starting position passed by TSA bool leftbuffer = !(InputPosWrite & 0x80); if (InputPosWrite == 0xFFFF) // Data request not made yet diff --git a/pcsx2/SPU2/ReadInput.cpp b/pcsx2/SPU2/ReadInput.cpp index 563bf13bfa..9668cfb024 100644 --- a/pcsx2/SPU2/ReadInput.cpp +++ b/pcsx2/SPU2/ReadInput.cpp @@ -35,7 +35,7 @@ StereoOut32 V_Core::ReadInput_HiFi() if (psxmode) ConLog("ReadInput_HiFi!!!!!\n"); - s16 ReadIndex = (OutPos * 2) & 0x1FF; + u16 ReadIndex = (OutPos * 2) & 0x1FF; StereoOut32 retval( (s32&)(*GetMemPtr(0x2000 + (Index << 10) + ReadIndex)), @@ -104,7 +104,7 @@ StereoOut32 V_Core::ReadInput_HiFi() StereoOut32 V_Core::ReadInput() { StereoOut32 retval; - s16 ReadIndex = OutPos; + u16 ReadIndex = OutPos; for (int i = 0; i < 2; i++) if (Cores[i].IRQEnable && (0x2000 + (Index << 10) + ReadIndex) == (Cores[i].IRQA & 0xfffffdff)) diff --git a/pcsx2/SPU2/defs.h b/pcsx2/SPU2/defs.h index fa2fca4b90..76cb75fe87 100644 --- a/pcsx2/SPU2/defs.h +++ b/pcsx2/SPU2/defs.h @@ -554,9 +554,9 @@ extern V_Core Cores[2]; extern V_SPDIF Spdif; // Output Buffer Writing Position (the same for all data); -extern s16 OutPos; +extern u16 OutPos; // Input Buffer Reading Position (the same for all data); -extern s16 InputPos; +extern u16 InputPos; // SPU Mixing Cycles ("Ticks mixed" counter) extern u32 Cycles; diff --git a/pcsx2/SPU2/spu2freeze.cpp b/pcsx2/SPU2/spu2freeze.cpp index 04f2a3a0df..e1b2dfe1a2 100644 --- a/pcsx2/SPU2/spu2freeze.cpp +++ b/pcsx2/SPU2/spu2freeze.cpp @@ -41,8 +41,8 @@ struct SPU2Savestate::DataBlock u32 version; // SPU2 version identifier V_Core Cores[2]; V_SPDIF Spdif; - s16 OutPos; - s16 InputPos; + u16 OutPos; + u16 InputPos; u32 Cycles; u32 lClocks; int PlayMode; diff --git a/pcsx2/SPU2/spu2sys.cpp b/pcsx2/SPU2/spu2sys.cpp index 59aa6b2327..2feab1d82e 100644 --- a/pcsx2/SPU2/spu2sys.cpp +++ b/pcsx2/SPU2/spu2sys.cpp @@ -37,8 +37,8 @@ V_CoreDebug DebugCores[2]; V_Core Cores[2]; V_SPDIF Spdif; -s16 OutPos; -s16 InputPos; +u16 OutPos; +u16 InputPos; u32 Cycles; int PlayMode;