Please don't convert all the mono sounds to stereo if this can be avoided. That practically doubles the size of such files. And the SoundPack is already over 137 Mb... It's true that there are not many mono sounds right now. But when I get around to finishing my additions, there will be a bunch more.
Besides, from what I'm reading, the source being mono may not be the problem at all...
mono is definitely problem on windows, java sound api will refuse to apply balance to mono sounds, you can try that for yourself.
...[snip]
And do not worry, I am not going to double size of soundpack pointlessly :-)
OK, I just tried out the newest release 29. And, yeah, that gives error messages about balance not being supported when playing mono files (
any mono file, whether in mp3 format or not). I didn't realize that balance was a brand new feature. But I also noticed it can give the same type of error message for
certain cases of
stereo files. For example, the "Sword Strike And Clash-SoundBible.com-1345262316.mp3" sound in the [default] folder that comes with the SoundSense package is in stereo and it will give a balance error.
I noticed your "RandomBalance", "BalanceLeft", and "BalanceRight" examples in the [default] folder behaves as one would expect and with no error. So we know the balance feature
can work if Java
wants to behave itself. But I would not be surprised if the balance support of Java is either buggy or very, very particular. (I don't know. Perhaps it expects the input source to be within a certain range of volume or it expects it to be filtered or something?)
Here's an idea: Perhaps you could have SoundSense first determine whether a sound file to be played is mono or stereo and if it is mono, then it will skip trying to apply balance - only attempting to use it on stereo files?
Ah, perhaps you could have it so the balance code is normally disabled or bypassed and only enabled for sounds in the .xml file which have either randomBalance or balanceAdjustment applied to it?
Alternatively, since the files themselves seem to play and sound just fine whether they report an error about balance or not, perhaps you could just trap those error messages so they never appear in the SoundSense window? (Unless, of course, the ".level = ALL" line in the logging.properties file is edited to enable verbos output of debug messages.)
That's not really fixing the problem - just covering up the symptoms. However, if this is really due to buggy Java code, then there's probably not much you can do except complain to them. Or wait for them to fix this feature in some future release.