Troubleshooting this TutorialSometimes, even though you try hard to understand the information in a tutorial, things don't work out quite like you want it to. This page is here to help you resolve any problems you might be having with the location audio effect tutorial. The Common Mistakes section describes common problems that people have when doing the things in this tutorial, and how to resolve them. The Frequently Asked Questions section describes questions that people have that aren't related to mistakes, but rather, trying to understand the stuff better or exploring how it can be used. If your problem or concern isn't addressed here, feel free to add a comment below, so that I know where you're having trouble. I like to keep these pages fairly clean, so I may remove comments that I felt like have been addressed. If I remove your comment and you don't feel like the problem has been fixed, repost the question and we'll take another look at it. If a tutorial has a mistake in it, I will fix the mistake and reply to the comment with a brief explanation. However, after a couple of weeks I'll likely go back and remove the original comment as well as my reply, because, hopefully, the problem will have been fixed, and it won't be a concern any more. |
Common MistakesNone listed yet… |
Frequently Asked QuestionsNone listed yet… |
One important point I have just solved: you need to use a mono sound file, rather than a stereo one.
Mine was stereo, and it drove me crazy that I was getting no location effect at all; I wondered whether the problem arose from XACT, but testing the non-XACT version of playing the sound, there was no sound location either. I finally realized stereo was definitely the cause, and turned the file to mono through Audacity: now, everything works fine!
I noticed the following page warns of an exception if one tries to use a stereo file, but as it turned out, I did not get one; beware, people!
(remove spaces)
gamefromscratch . com/monogame-tutorial-audio/
I surmise that the MonoGame people decided that it was better not to terminate the program for a generally minor miss at execution, which makes sense; however, this is bad for testing, as you can overlook the problem. As I did for some time.
(The following regards the case of MonoGame.)
Even with a mono sound file, I realize there is another problem (at least in my case): using the XACT-generated files, there is some sound localisation; nevertheless, it seems possibly partial and most importantly somewhat jagged when the emitter crosses over to the left/right side.
On the other hand, using the non-XACT sound file (with the SoundEffectInstance class), everything sounds fine (with smooth transition from left to right and right to left)! So I am wondering if the problem comes from XACT itself. I noticed XACT has a 360 Pan property for the ‘helicopter’ wave in the lower left pane, so I checked ‘Enable’ and put the max pan to 360, but this did not change a thing.
Maybe the problem has to do with the absence of a standard importer and processor for XACT-generated files (as seen in MGCB Editor)? This is merely a wild guess.
Post preview:
Close preview