Odd PlaySound with volume

Previous topic - Next topic

Wampus

#15
Yeh, there seems to be some sort of exponential fall off rather than linear progression! After testing on my iPod I can confirm that both PLAYSOUND and PLAYMUSIC work as expected so no adjusting is needed there. On the PC though I get those strange values. I tested on three PCs and got 3 ever so slightly different results but a general pattern did emerge.

I've attached the little proggy I mentioned yesterday to this thread. Probably won't be of much use unless you want to see if your PC matches to similar values. The generated sound is a horrible square wave that I created in a hex editor rather than a sound program so be aware that your ears may bleed! To measure the output I used a output jack from the source PC and plugged the other end into the microphone jack on another PC then used a simple vu meter program from here: http://robotplanet.dk/knef/vumeter/

BTW I finally settled on these values as what I'm going to use for PC PLAYSOUND volume control for 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.91
30%0.89
20%0.86
10%0.8



[attachment deleted by admin]

Dabz

I've bunged this in the bug reports section, because obviously something is wrong (Tried it on two PC's now)

Dabz

Hemlos

70% volume results in almost inaudible sound.
Windows xp here.
Bing ChatGpt is pretty smart :O

Kitty Hello

instead of "MUSICVOLUME x" try "MUSICVOLUME (POW(x,  2.7182818285))" - does that sound better?
I'll include that in the engine then. The problem is, the ear is not working linear, but exponentially.

Hemlos

I thought it was just my ear not working  :S
Bing ChatGpt is pretty smart :O

Dabz

Quote
instead of "MUSICVOLUME x" try "MUSICVOLUME (POW(x,  2.7182818285))" - does that sound better?
I'll include that in the engine then. The problem is, the ear is not working linear, but exponentially.

MUSICVOLUME seems fine, its #volume in the PLAYSOUND parameter that seems to be the broken Kitty me auld fruit.

If that works, I'll just wait till you update the engine, as mentioned, it all seems fine on iOS! :)

Thanks for taking a look at it, much appreciated! ;)

Dabz

Kitty Hello

is the POW mehtod for playsound working then?

spudgunjake

I had problems with samples, but found out that its was some codex on my pc, I uninstalled what I coould find and just have VLC player and media player installed, and it worked fine. I very careful what codex i use, I install ogg codex for windows this morning and my apt some times crashes.  just sures you what can happen.

Dabz

Code (glbasic) Select

soundVol# = POW(0.5,  2.7182818285)
LOCAL ch% = PLAYSOUND(menu_click%,0,soundVol#)


Nothing Kitty, not a whimper, even with it as soundVol# = POW(0.8,  2.7182818285), with 0.8 being audible when used without POW!

Quote
I uninstalled what I coould find and just have VLC player and media player installed, and it worked fine.

Well, thats all well and good, and indeed a fix then, but alas, no good if your planning to sell your game... No customer is gonna want a faff like that, some of them can barely open a zip file never mind fannying on with codecs! :D

Dabz