A better music volume control

For questions about using Classic.

Post » Fri Dec 31, 2010 6:48 pm

As you all might know, the music volume is controlled with a value in the range [0, 100]
Unfortunately, this sets the volume on a linear scale, whereas human ears hear the loudness on a logarithmic scale.

To set the volume of the music more naturally (meaning 50% feels like half as loud, etc), do this:

-> XAudio2: Set music volume to max(log10(myVolume) * 50, 0)

where myVolume is your desired percentage in the range [0, 100]
Image
B
23
S
8
G
10
Posts: 1,820
Reputation: 8,242

Post » Sun Jan 02, 2011 3:13 am

Pretty neat. I made a .cap and scaled the volume from 0-100 on both linear and logarithmic scales, and logarithmic definitely sounds more natural.
B
4
S
1
G
5
Posts: 98
Reputation: 1,648


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 7 guests