Throughout the movie there are scenes where day suddenly changes to night and vice versa. This is a running gag of Tom Stoppard plays which often have "time jumps" written into the stage directions.
When we see Hamlet play the flute, we can hear music even when his lips draw back and he clearly stops blowing.