Jump to content

The deep and lasting joy of fractional frame rates


Phil Rhodes

Recommended Posts

  • Premium Member

I have decided that, every time I have to write a piece of code like this, I'm going to gripe about it to Americans.

 

Grrrr.

uint8_t ltc_get_next_frame(){
  if(ltc_ff == ltc_framerate_maxframes[ltc_framerate_now]){
    if(ltc_df &&
      ltc_ss == 59 &&
      ltc_mm != 9 &&
      ltc_mm != 19 &&
      ltc_mm != 29 &&
      ltc_mm != 39 &&
      ltc_mm != 49 &&
      ltc_mm != 59     
    ){
      return 2;
    } else {
      return 0;
    }
  } else {
    return ltc_ff + 1;
  }
}
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...