-
Notifications
You must be signed in to change notification settings - Fork 7
Basic Setup
John Baglio edited this page Dec 30, 2023
·
2 revisions
This page serves as a guideline on how to start using MonoSound in your MonoGame project.
First, MonoSound must be initialized in Game.LoadContent():
protected override void LoadContent() {
// TODO: use this.Content to load your game content here
MonoSoundLibrary.Init(this);
/* Additional logic here... */
}After MonoSound is initialized, the rest of the API will be available to use.
Also, it is important to de-initialize MonoSound in Game.OnExiting():
protected override void OnExiting(object sender, EventArgs args) {
MonoSoundLibrary.DeInit();
}This allows MonoSound to free up its objects and stop any streams, if any are active.