Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / [SOLVED] Sound balance doesn't work properly.

Author
Message
Batmaster75
5
Years of Service
User Offline
Joined: 28th Oct 2018
Location:
Posted: 20th Mar 2020 21:19
SO = LoadSound("Test.wav")
ID = PlaySound(SO)
SetSoundInstanceBalance(ID,-1)
----------------------------------------------
This should play test.wav only in the left channel. It doesn't seem to work. Sound is heard in both channels. Is it AppGameKit bug or am I doing something wrong? Thanks for advice.
(Test.wav is mono, AppGameKit 2019.12.16, Windows 10.)

The author of this post has marked a post as an answer.

Go to answer

SFSW
21
Years of Service
User Offline
Joined: 9th Oct 2002
Location:
Posted: 20th Mar 2020 21:32
Is your test sound stereo or mono? I also had trouble getting any stereo sounds to work with balancing, but mono sequences always seemed to work fine.
fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 20th Mar 2020 21:51
I believe u need 16 bit stereo 44,1 kHz PCM
and sounds under 9kb wont play

fubarpk on Itch...………...https://fubarpk.itch.io/
fubarpk on googleplay..https://play.google.com/store/apps/developer?id=fubarpk
SFSW
21
Years of Service
User Offline
Joined: 9th Oct 2002
Location:
Posted: 20th Mar 2020 22:02
That bit and sample rate also wouldn't work for me. I also tried lower. It may be something device specific also, I don't know. The only sounds that behaved properly for me with instance balancing left-right were mono.
fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 20th Mar 2020 22:16 Edited at: 20th Mar 2020 22:17
not sure, I can remember things had to be quiet specific just cant find what they are atm sorry
but perhaps try OGG

fubarpk on Itch...………...https://fubarpk.itch.io/
fubarpk on googleplay..https://play.google.com/store/apps/developer?id=fubarpk
Batmaster75
5
Years of Service
User Offline
Joined: 28th Oct 2018
Location:
Posted: 20th Mar 2020 22:29
This post has been marked by the post author as the answer.
OK guys. I have re-sampled all wav using 16bits/mono/44kHz as you suggested and now it is working fine.
Thanks to all of you for your quick and helpful answers.
SFSW
21
Years of Service
User Offline
Joined: 9th Oct 2002
Location:
Posted: 20th Mar 2020 23:48
The mono part of that indeed seems to be the solution. I also use mono sounds at different sample rates with success. Glad you got it to work.

Login to post a reply

Server time is: 2024-04-24 10:20:01
Your offset time is: 2024-04-24 10:20:01