2

I'm making a game in XNA... I havent looked at monogame yet but I'm conscious that I probably will be looking at it in the future..

I havent implemented sounds in my game yet.. Atmosphere is very imprtant in this game so different reverb and delay on the sounds in different rooms is important.

I could use XACT to do this dynamically, however I know XACT is not supported by Monogame

Is there something else I could look at??

What I could do is record 3 versions of each sound effect with little, medium and high reverb and just play different ones depending on what room you are in.. I think this would work ok and I'm assuming with less real-time audio processing going on it will be lighter on CPU.

Guye Incognito
  • 2,726
  • 6
  • 38
  • 72

1 Answers1

1

This is an old question, but I think it still needs an appropriate answer for the one who are looking for an answer.

For sound in Monogame, you can use SoundEffect or MediaPlayer classes to play audio.

Example for SoundEffect class:

  • Declaration: SoundEffect soundEffect;
  • In LoadContent(): soundEffect= Content.Load<SoundEffect>("sound_title");
  • In wherever you want to play this sound: soundEffect.Play();

Example for SoundEffectInstances class (using SoundEffect that created above):

SoundEffectInstance soundEffectInstance = effect.CreateInstance();    
soundEffectInstance.Play();

Then you can stop the soundeffect from playing whenever you want by using: soundEffectInstance.Stop();

Example for MediaPlayer class (best for background music): In LoadContent():

Song song = Content.Load<Song>("song_title");
MediaPlayer.Play(song);

Hope this helps!

Silver
  • 482
  • 2
  • 6
  • 2
    While this might be useful information, I do not think it answers the question as asked. The user looks for a replacement for features offered by XACT (such as certain effects applied to a single sound, like distance and reverb), not just any way to play a sound (which they already can, but it would require multiple sound files while one would've sufficed if using XACT). – htmlcoderexe Apr 12 '19 at 23:49