mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-19 22:48:18 +00:00
cleaned up few things
This commit is contained in:
parent
d1ee52c372
commit
75222892be
|
@ -59,7 +59,7 @@ static LOCK m_SoundLock = 0;
|
||||||
static int m_CenterX = 0;
|
static int m_CenterX = 0;
|
||||||
static int m_CenterY = 0;
|
static int m_CenterY = 0;
|
||||||
|
|
||||||
static int m_MaxDistance = 1500;
|
static float m_MaxDistance = 1500.0f;
|
||||||
|
|
||||||
static int m_MixingRate = 48000;
|
static int m_MixingRate = 48000;
|
||||||
static volatile int m_SoundVolume = 100;
|
static volatile int m_SoundVolume = 100;
|
||||||
|
@ -78,13 +78,6 @@ static short Int2Short(int i)
|
||||||
return i;
|
return i;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int IntAbs(int i)
|
|
||||||
{
|
|
||||||
if(i<0)
|
|
||||||
return -i;
|
|
||||||
return i;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void Mix(short *pFinalOut, unsigned Frames)
|
static void Mix(short *pFinalOut, unsigned Frames)
|
||||||
{
|
{
|
||||||
int MasterVol;
|
int MasterVol;
|
||||||
|
@ -142,8 +135,8 @@ static void Mix(short *pFinalOut, unsigned Frames)
|
||||||
// linear falloff
|
// linear falloff
|
||||||
float Falloff = 1.0f - Dist/m_MaxDistance;
|
float Falloff = 1.0f - Dist/m_MaxDistance;
|
||||||
|
|
||||||
Lvol = (int)Lvol*Lgain*Falloff;
|
Lvol = Lvol*Lgain*Falloff;
|
||||||
Rvol = (int)Rvol*Rgain*Falloff;
|
Rvol = Rvol*Rgain*Falloff;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue