File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -1869,22 +1869,22 @@ static ALfloat calculate_distance_attenuation(const ALCcontext *ctx, const ALsou
18691869 switch (ctx -> distance_model ) {
18701870 case AL_INVERSE_DISTANCE_CLAMPED :
18711871 distance = SDL_min (SDL_max (distance , src -> reference_distance ), src -> max_distance );
1872- /* fallthrough */
1872+ SDL_FALLTHROUGH ;
18731873 case AL_INVERSE_DISTANCE :
18741874 /* AL SPEC: "gain = AL_REFERENCE_DISTANCE / (AL_REFERENCE_DISTANCE + AL_ROLLOFF_FACTOR * (distance - AL_REFERENCE_DISTANCE))" */
18751875 return src -> reference_distance / (src -> reference_distance + src -> rolloff_factor * (distance - src -> reference_distance ));
18761876
18771877 case AL_LINEAR_DISTANCE_CLAMPED :
18781878 distance = SDL_max (distance , src -> reference_distance );
1879- /* fallthrough */
1879+ SDL_FALLTHROUGH ;
18801880 case AL_LINEAR_DISTANCE :
18811881 /* AL SPEC: "distance = min(distance, AL_MAX_DISTANCE) // avoid negative gain
18821882 gain = (1 - AL_ROLLOFF_FACTOR * (distance - AL_REFERENCE_DISTANCE) / (AL_MAX_DISTANCE - AL_REFERENCE_DISTANCE))" */
18831883 return 1.0f - src -> rolloff_factor * (SDL_min (distance , src -> max_distance ) - src -> reference_distance ) / (src -> max_distance - src -> reference_distance );
18841884
18851885 case AL_EXPONENT_DISTANCE_CLAMPED :
18861886 distance = SDL_min (SDL_max (distance , src -> reference_distance ), src -> max_distance );
1887- /* fallthrough */
1887+ SDL_FALLTHROUGH ;
18881888 case AL_EXPONENT_DISTANCE :
18891889 /* AL SPEC: "gain = (distance / AL_REFERENCE_DISTANCE) ^ (- AL_ROLLOFF_FACTOR)" */
18901890 return SDL_powf (distance / src -> reference_distance , - src -> rolloff_factor );
You can’t perform that action at this time.
0 commit comments