• Show log

    Commit

  • Hash : 111c3add
    Author : Ryan C. Gordon
    Date : 2022-04-10T13:23:51

    audio: Resampler optimizations.
    
    - Calculate `j * RESAMPLER_SAMPLES_PER_ZERO_CROSSING` once per loop
      iteration since we use it multiple times.
    - Do the left-wing loop in two sections: while `srcframe < 0` and then
      the remaining calculations when `srcframe >= 0`. This bubbles a conditional
      out of every iteration of a tight loop, giving us a boost. We could
      _probably_ do this to the right-wing loop too, but it's less straightforward
      there.
    - The real win: Use floats instead of doubles. This almost doubles the speed
      of the entire function on Intel CPUs, and for embedded things without
      hardware-level support for doubles, the speedup is enormous. This in
      theory might reduce audio quality, though, and I had to put a check in
      place to avoid a division-by-zero that we avoided at higher precision, but
      this is likely to be worth keeping for at least the Sony PSP and other
      smaller platforms, if not everyone.
    

  • Properties

  • Git HTTP https://git.kmx.io/kc3-lang/SDL.git
    Git SSH git@git.kmx.io:kc3-lang/SDL.git
    Public access ? public
    Description

    Fork of https://github.com/libsdl-org/SDL

    Users
    thodg_m kc3_lang_org thodg_w www_kmx_io thodg thodg_l
    Tags