Skip to content

Commit

Permalink
Add Android log2f patch
Browse files Browse the repository at this point in the history
  • Loading branch information
jgranick committed May 8, 2019
1 parent f7b3962 commit d66ef73
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions Alc/ALc.c
Original file line number Diff line number Diff line change
Expand Up @@ -2237,6 +2237,14 @@ static ALCenum UpdateDeviceParams(ALCdevice *device, const ALCint *attrList)
device->DitherDepth = powf(2.0f, (ALfloat)(depth-1));
}
}

#ifndef log2f
#ifndef M_LOG2_E
#define M_LOG2_E 0.693147180559945309417
#endif
#define log2f(x) (log (x) / (float) M_LOG2_E)
#endif

if(!(device->DitherDepth > 0.0f))
TRACE("Dithering disabled\n");
else
Expand Down

0 comments on commit d66ef73

Please sign in to comment.