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:
@@ -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);
|
||||
Reference in New Issue
Block a user