(a) (1) An officer making an arrest under a warrant issued upon a complaint, or any person making an arrest without a warrant for an offense committed in his presence or as otherwise authorized by law, shall take the arrested person without unnecessary delay before a magistrate of the county where the arrest is made.
(2) If a person arrested without a warrant is brought before a magistrate, a complaint shall be filed forthwith in accordance with the requirements of rules of the Supreme Court of Appeals.
(3) An officer executing a warrant shall make return thereof to the magistrate before whom the defendant is brought.
(b)(1) Notwithstanding any other provision of this code to the contrary, if a person arrested without a warrant is brought before a magistrate prior to the filing of a complaint, a complaint shall be filed forthwith in accordance with the requirements of rules of the Supreme Court of Appeals, and the issuance of a warrant or a summons to appear is not required.
(2) When a person appears initially before a magistrate either in response to a summons or pursuant to an arrest with or without a warrant, the magistrate shall proceed in accordance with the requirements of the applicable provisions of the rules of the Supreme Court of Appeals.