Skip to content

Commit

Permalink
Avoid unnecessary float<->double conversions
Browse files Browse the repository at this point in the history
  • Loading branch information
Tilka committed Dec 28, 2021
1 parent 3e6ebb1 commit 88c59ee
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/play.c
Original file line number Diff line number Diff line change
Expand Up @@ -1227,11 +1227,11 @@ static void xm_tick(xm_context_t* ctx) {
#if XM_RAMPING
/* See https://modarchive.org/forums/index.php?topic=3517.0
* and https://github.com/Artefact2/libxm/pull/16 */
ch->target_volume[0] = volume * sqrt(1.f - panning);
ch->target_volume[1] = volume * sqrt(panning);
ch->target_volume[0] = volume * sqrtf(1.f - panning);
ch->target_volume[1] = volume * sqrtf(panning);
#else
ch->actual_volume[0] = volume * sqrt(1.f - panning);
ch->actual_volume[1] = volume * sqrt(panning);
ch->actual_volume[0] = volume * sqrtf(1.f - panning);
ch->actual_volume[1] = volume * sqrtf(panning);
#endif
}

Expand Down

0 comments on commit 88c59ee

Please sign in to comment.