I'm trying to get the audio left/right balance to work on Android but the
SetSoundInstanceBalance command seems to be ignored. It works perfectly on Windows and iOS but not my Android device. If I use a stereo sound file with audio in it that switches from left to right the app plays it fine and the audio switches from left to right as expected. If I use the
SetSoundInstanceBalance command to force left or right it makes no difference. If I use a mono sound file the
SetSoundInstanceBalance command also has no effect.
If anyone can test this out for me I will be very grateful. It is possible it is my device but all other stereo tests work fine.
Here is some quick test code which should move the sound gently from left to right and back again in a loop:
snd = LoadSound("sound.wav")
sndinstance = PlaySound(snd, 100,1)
balance# = -1.0
balanceadd# = 0.02
do
balance# = balance# + balanceadd#
if (balance# >= 1.0) then balanceadd# = -0.02
if (balance# <= -1.0) then balanceadd# = 0.02
SetSoundInstanceBalance(sndinstance, balance#)
Print(balance#)
Sync()
loop
You can use your own sound sample or the attached WAV file which is mono 44.1KHz 16bit.
Thanks.
EDIT: Updated the attached sound file as the original one was far too quiet for testing.