SPU2: Make SndOut.h compile in isolation

This commit is contained in:
Stenzek 2023-01-20 00:59:35 +10:00 committed by refractionpcsx2
parent fcfb9865df
commit a747a5f9fa
2 changed files with 48 additions and 46 deletions

View File

@ -15,52 +15,6 @@
#pragma once
struct StereoOut32
{
static const StereoOut32 Empty;
s32 Left;
s32 Right;
StereoOut32()
: Left(0)
, Right(0)
{
}
StereoOut32(s32 left, s32 right)
: Left(left)
, Right(right)
{
}
StereoOut32 operator*(const int& factor) const
{
return StereoOut32(
Left * factor,
Right * factor);
}
StereoOut32& operator*=(const int& factor)
{
Left *= factor;
Right *= factor;
return *this;
}
StereoOut32 operator+(const StereoOut32& right) const
{
return StereoOut32(
Left + right.Left,
Right + right.Right);
}
StereoOut32 operator/(int src) const
{
return StereoOut32(Left / src, Right / src);
}
};
extern void Mix();
extern s32 clamp_mix(s32 x);
extern StereoOut32 clamp_mix(StereoOut32 sample);

View File

@ -43,6 +43,8 @@ struct SndOutDeviceInfo
};
std::vector<SndOutDeviceInfo> GetOutputDeviceList(const char* omodid, const char* driver);
struct StereoOut16;
struct Stereo51Out16DplII;
struct Stereo51Out32DplII;
@ -55,6 +57,52 @@ extern void ProcessDplIISample32(const StereoOut16& src, Stereo51Out32DplII* s);
extern void ProcessDplSample16(const StereoOut16& src, Stereo51Out16Dpl* s);
extern void ProcessDplSample32(const StereoOut16& src, Stereo51Out32Dpl* s);
struct StereoOut32
{
static const StereoOut32 Empty;
s32 Left;
s32 Right;
StereoOut32()
: Left(0)
, Right(0)
{
}
StereoOut32(s32 left, s32 right)
: Left(left)
, Right(right)
{
}
StereoOut32 operator*(const int& factor) const
{
return StereoOut32(
Left * factor,
Right * factor);
}
StereoOut32& operator*=(const int& factor)
{
Left *= factor;
Right *= factor;
return *this;
}
StereoOut32 operator+(const StereoOut32& right) const
{
return StereoOut32(
Left + right.Left,
Right + right.Right);
}
StereoOut32 operator/(int src) const
{
return StereoOut32(Left / src, Right / src);
}
};
struct StereoOut16
{
s16 Left;