Problem Description
The Audio object's "Set master volume" event takes in Decibels, but the Audio.MasterVolume property returns a volume value from 0.0 to 1.0.
The manual here (https://www.scirra.com/manual/109/audio) states that MasterVolume returns the current master volume set using the Set master volume action.
Furthermore, the in-editor description of this property states "Get the current master volume, in decibels."
Attach a Capx
https://www.dropbox.com/s/rqq17dkg6o5ea ... .capx?dl=0
Description of Capx
Simple example of showing difference between Decibels value and Audio.MasterVolume property
Steps to Reproduce Bug
- Run project
- See that Audio.MasterVolume differs from "Decibels" value
- Press up and down to see other values
Observed Result
Decibels greater than or equal to 0 produces MasterVolume = 1, negative values of Decibels produces fractional values of MasterVolume
Expected Result
MasterVolume equals Decibels. It would also be nice to set/get the volume controls in a 0-1 scale as this makes more sense for volume controls (a useful formula is Decibels = ln(Volume + 0.0001) / (ln(10) / 20))
Affected Browsers
- Chrome: YES
- FireFox: YES
- Internet Explorer: YES
Operating System and Service Pack
Windows 7 Service Pack 1
Construct 2 Version ID
Release 190 (64-bit) built at 14:54:22 on Nov 25 2014