Inconsistent Audio Master Volume

Bugs will be moved here once resolved.

Post » Tue Dec 09, 2014 4:51 am

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
B
10
S
2
Posts: 33
Reputation: 710

Post » Tue Dec 09, 2014 7:04 pm

Thanks, good catch, fixed for the next build.
Scirra Founder
B
399
S
236
G
89
Posts: 24,519
Reputation: 195,351


Return to Closed bugs

Who is online

Users browsing this forum: No registered users and 1 guest