 attaches (0) in a case tried to a jury, when the jury is impaneled and sworn; (0) when a judge, hearing a case without a jury, begins to hear evidence as to the guilt of the defendant; or (0) at the time the trial court 