DC to phase relationship with Low pass filtered sine and square wave multiplication and it's pitfalls. IQ Demodulation
So if your sampling rate is four times the modulated signal frequency (and sampling synchronously) then $\omega= \pi/2$. So then
$$
\begin{array}
 II(t) &amp;=&amp; s(t) - s(t-2)\\
&amp;=&amp; A\sin(\pi/2 t + \theta) - A\sin(\pi/2 (t - 2) + \theta)\\
&amp;=&amp; 2A\sin(\pi/2 t + \theta) 
\end{array}
$$
and
$$
\begin{array}
 QQ(t) &amp;=&amp; s(t-3) - s(t-1)\\
&amp;=&amp; A\sin(\pi/2 (t-3) + \theta) - A\sin(\pi/2 (t - 1) + \theta)\\
&amp;=&amp; A\sin(\pi/2 t + \theta - 3\pi/2) - A\sin(\pi/2 t + \theta - \pi/2)\\
&amp;=&amp; 2A \cos((\pi/2 t + \theta - 3\pi/2 + \pi/2 t + \theta - \pi/2)/2) \\
&amp;&amp;\sin((\pi/2 t + \theta - 3\pi/2 - (\pi/2 t + \theta - \pi/2))/2)\\
&amp;=&amp; 2A\cos(\pi/2 t + \theta) 
\end{array}
$$

The trick will be to think about the square wave case, and see what this derivation tells you about that.