sound distancemodel tweakings

git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@2395 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
driAn
2008-08-26 19:42:45 +00:00
parent 58386fdf36
commit e53162c9fc
+9 -8
View File
@@ -113,7 +113,11 @@ struct source
{
alclearerr();
alGenSources(1, &id);
alSourcef(id, AL_REFERENCE_DISTANCE, 1.0f);
// fit into distance model
alSourcef(id, AL_REFERENCE_DISTANCE, 3.0f);
alSourcef(id, AL_ROLLOFF_FACTOR, 1.0f);
return !alerr(false);
}
@@ -236,13 +240,6 @@ struct source
return !alerr();
}
bool referencedistance(float r)
{
alclearerr();
alSourcef(id, AL_REFERENCE_DISTANCE, 80);
return !alerr();
}
void printposition()
{
alclearerr();
@@ -1228,6 +1225,7 @@ void initsound()
if(context)
{
alcMakeContextCurrent(context);
alDistanceModel(AL_EXPONENT_DISTANCE_CLAMPED);
// backend infos
@@ -1619,3 +1617,6 @@ void soundtest()
}
COMMAND(soundtest, ARG_NONE);
void t1() { conoutf("%f", player1->o.x); }
COMMAND(t1, ARG_NONE);