If the crime is of a mild degree or of amount not exceeding a few thousands or of a crime wherein imprisonment is less than 1 year, you can obtain passport only after the leave of the Court is granted. if the crime is not of a large magnitude, an application can be sent to the Court where the case is pending listing the reasons to obtain passport, desired dates of journey, and an assurance that the accused will not flee away.
In this case, you cannot settle the matter by compromising the case because it has been held that the offence punishable under Section 304A India Penal Code, 1860 cannot be termed to be an offence private in nature. It is a serious offence which impacts the fabric of society.
The offence in question is non-compoundable as has been held in Baldev Singh v. State of Punjab & Anr. Once the case is closed and it results in your acquittal then there can be no issues in obtaining the visa but with a pending criminal case, you cannot get the Visa to leave the country. You can file an application in the court for getting a sooner date and quicker disposal of the said case.
Reference: Section 304A of the Indian Penal Code, 1860 and Baldev Singh v. State of Punjab & Anr