"The evidence of any person whose evidence is of a formal character may be provided by affidavit and, subject to all just exceptions, may be read as evidence in any inquiry, trial, or other proceeding under this Code.
The Court may, if it deems fit, and shall, upon the application of either the prosecution or the accused, summon and examine such person regarding the facts contained in their affidavit."