Odd PlaySound with volume

Previous topic - Next topic

Dabz

When I use playsound with a volume of 1.0, its fine... Though, when I set it to 0.5, its barely audible, though, if I do the same with, say BlitzMax, setting the channel volume at 0.5:-

Code (glbasic) Select

sound = LoadSound ("path/sound.wav")
channel=CueSound(sound)
SetChannelVolume channel,0.5
ResumeChannel channel
Repeat
Until ChannelPlaying(channel) = False


it produces a sound that does indeed sound half the volume on the auld ears, whereas in GLBasic, its nothing more then a whisper!?!

Code (glbasic) Select

GLOBAL soundVol# = 0.5
PLAYSOUND(sound_id%,0,soundVol#)


Any idea's?

Dabz


Dabz

Quote
No idea but i have only been using this software for less than a week and i think it's ridiculous that the fact its Version 8.203 wtf or whatever and it still has more bugs than a dog shit in the height of summer in it.

Dont sit on the fence there, let us know what you really think! :D

Seriously, there really is something up because I've tried it with PlayMusic and it works as expected when you set MusicVolume with 0.5

Dabz

MrTAToad

#2
QuoteAny idea's?
Do you have Windows volume up to maximum ?  If not, then put it to maximum and try again.  The volume is a percentage of the global volume value (at least on Windows).  Also is it a stereo sample ?

Quotewhatever and it still has more bugs than a dog shit in the height of summer in it
So where are your bug reports then ?

Dabz

Quote
Do you have Windows volume up to maximum ?  If not, then put it to maximum and try again.

First thing I tried!

Quote
The volume is a percentage of the global volume value (at least on Windows).  Also is it a stereo sample ?

All my effects are normalized mono samples, they are only little effects!

Do they need to be stereo, and if you dont mind, whats the difference in terms of playing them through GLBasic, when it works fine via BlitzMax? (I'd just like to know really)

Dabz

Dabz

Converted the track to stereo... No difference!

Dabz

MrTAToad

GLBasic using DirectX 7 for Windows and BlitzMax uses various things

Dabz

#6
Very technical information there Mr Toad... Thanks for that! ;) Hehehe

Nah, doesnt matter if its stereo or not, same result, as in, its not working as expected, and as such, doesnt matter what it uses, if 0.5 is half, but its playing at 0.1, theres something amiss, simple as as simple is!

Only thing I have to see is how it runs on iOS, I havent tried it for a while on their due to the missing lib file when building through VM, may as well have a pop!

Dabz

Dabz

Looks like its a Windows thing!!!

Maybe Kitty should move the windows driver to OpenAL... That works, and OGG format is pretty good!

Dabz

MrTAToad

Might be an idea - dont forget to do a Bug Report!

Leginus

#9
Sound volume works fine on os, but it does seems a little sensitive on Windows

@ Ionise
The reason that there may be the odd bug now and again (like with every software) is that GLbasic is constantly evolving to provide us with new features, different os compatibility etc.  And if you need and example of bugs with other stuff, how many updates does windows do a week??

Oh and just a quick thought (and i am not trying to start arguments) but this forum is also used by some younger people so maybe editing the language maybe an idea.  I have too and work on a building site so believe me I swear a lot :)



Ian Price

The volume issue has come up before - I recall mentioning the differing volumes of GP2X, Wiz and pc - all three are totally different. Even the GP2X F100 and F200 are different - I think that's actually a hardware issue with those machines. This proves that it's not possible to get everything right for every machine as there are just too many variations.

And negative comments such as those above are most definitely not welcome here - report bugs by all means, as they do exist, but be constructive and try to at least provide examples rather than posting general statements. That's just trolling.
I came. I saw. I played.

Wampus

An idea for what can be done to get around this: Test the actual output volume of PLAYSOUND by recording it with another computer as a WAV. Then you could compare to a WAV that has been set to amplifications of 100%, 90%, 80%, etc. in something like Audacity. That way you can see what PLAYSOUND volume levels match most closely. Perhaps there is a exponential relationship or whatever. I don't know but I have been meaning to do this recently. Perhaps today is the day.

BTW Ionise I think your frustration is understandable but you were very harsh with your metaphor! It smacks of naivety. Nothing is perfect in this world but there is such a thing as good enough. If GLBasic isn't good enough for what you want to use it for I have to wonder what would live up to your expectations (and if there is anything in the real world that comes close to it).

Wampus

Ok, so I wrote a little app to that I'll upload tomorrow that can be used to compare PLAYSOUND volumes and WAVS normalised to various volumes. I'll explain a bit more then but basically it allows you to find out what corresponding PLAYSOUND volume settings are approximately the same as 90%, 80%, 70% volume, etc. I would've posted it right now but I haven't had a chance to test it on my iPod since my Xcode installation is kerbukacuffled for no good reason. GAH! I have to wait a few hours just for a copy of the new version to install so I'm going to give up for tonight and try again in the morning.

For now, below are the results of my first run of the app to check what volume I should be settings for PLAYSOUND on my PC. They might be different with your PC & sound hardware and the results are only roughly equivalent since PLAYSOUND volume settings only register two decimal places even though the accuracy needed for a more equivalent volume requires about 3 (something I learnt just now):-













Volume    - -    Equivalent PLAYSOUND volume setting
100%1.0
90%0.99
80%0.98
70%0.96
60%0.95
50%0.93
40%0.92
30%0.9
20%0.87
10%0.81

Ian Price

Wow! Those are strange values. It would be interesting to see if those values are roughly consistant with everyone's machines - I suspect not, but it might make workinig out volume levels a bit easier. The above is one of the reasons I introduced proper volume control options into some of my handheld games.
I came. I saw. I played.

Dabz

#14
@Ragaril

Never tested, but thats roughly what I'm getting... Basically, when its set at 0.5, its barely audible, and I mean volume is right up and I can just make it out... Though, it does work as expected on my iPlod, which is good enough for the moment.

But, it is a bit of a knacker since 99% of the dev is on bootcamp, and to test I have to log out of bootcamp, go into OSX, copy and paste the xCode project, build that, go back into bootcamp,  tinker with the value... Rinse repeat*!  :S

Dabz

EDIT:

*Fixed... Needed to add a drive letter to the sodding shared folders in order for that libsomething.a to be outputted... NICE!!!!