1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-07-10 12:29:01 +00:00

Fixed NTSC phase.

This commit is contained in:
Thomas Harte 2017-01-11 21:31:24 -05:00
parent b4159295f6
commit be1cb2a551

View File

@ -71,7 +71,7 @@ void Machine::setup_output(float aspect_ratio)
"uint y = c & 14u;"
"uint iPhase = (c >> 4);"
"float phaseOffset = 6.283185308 * float(iPhase - 1u) / 13.0;"
"float phaseOffset = 6.283185308 * float(iPhase) / 13.0 + 5.074880441076923;"
"return mix(float(y) / 14.0, step(1, iPhase) * cos(phase + phaseOffset), amplitude);"
"}");
speaker_->set_input_rate((float)(get_clock_rate() / 38.0));