Audio object volume increase problem

Bugs will be moved here once resolved.

Post » Tue Sep 08, 2015 2:48 pm

Problem Description
The Audio object does not register an increase in volume, when I set a sound file's dB level above 0. This prevents me from increasing the volume of my sound files above their original level. I have tried setting dB levels, both in the initial Audio "Play" action, and in the Audio "Set ("tag") volume" action. Minus values still work, but plus values are not registered above 0.

Attach a Capx
https://dl.dropboxusercontent.com/u/78057629/VolumeAdjustment.capx

Description of Capx
This capx plays a simple countdown audio track (e.g. 10... 9... 8... etc), in the "On start of layout" event. It has three buttons, which are all labelled. The first will reduce the audio tracks dB level to -20, the second will reset the dB level to 0, and the third will set it to +50.

Steps to Reproduce Bug
  • To test the Audio "Play" action: (1) Enable one of the Audio "Play" actions (in the "On start of layout" event) and disable the other two. (2) Try step 1 for all three versions and you'll notice that dB settings above 0 do not sound any louder.
  • To test the Audio "Set ("tag") volume" action: (1) Enable the Audio "Play" action with it's dB level set to 0 (in the "On start of layout" event) and disable the other 2 options (note: this is currently set as the default option). (2) Run the layout and press the "Lower volume" / "Reset volume" / "Raise volume" buttons. Once again you will notice that dB settings above 0 do not register as being any louder.

Observed Result
Setting an audio files dB level above 0 has no affect on the volume of the audio track.

Expected Result
When increasing the audio files dB level above 0, I had expected the volume to increase.

Affected Browsers
  • Chrome: (YES)
  • FireFox: (YES)
  • Internet Explorer: (YES)

Operating System and Service Pack
Windows 8.1 & 10

Construct 2 Version ID
version 212.2
B
33
S
6
G
7
Posts: 494
Reputation: 8,252

Post » Tue Sep 08, 2015 4:51 pm

Closing as by design. As per the Web Audio API you cannot amplify audio, only attenuate it. Given that much digital audio content is already normalised (reaching to peak level), allowing amplification would probably be something of an anti-feature anyway, since even slight amplification would immediately cause clipping and distort the audio. Certainly amplification as high as +50 would cause such severe clipping as to probably render the original sound unrecognisable.
Scirra Founder
B
395
S
232
G
88
Posts: 24,368
Reputation: 193,756

Post » Tue Sep 08, 2015 4:55 pm

@Ashley
You need to fix the manual then:
A volume of 0 dB is original volume, above 0 dB amplifies the sound, and below 0 dB attenuates the sound.
ImageImageImage
B
71
S
21
G
231
Posts: 3,688
Reputation: 129,352

Post » Tue Sep 08, 2015 5:00 pm

@Ashley, thanks for your reply.

I'm sure we used to be able to increase the dB level past 0 in C2. Here's a quote from the Audio section, in the Manual. You'll note that it does mention increasing the dB level above 0. This may be for information purposes only, but it does give the impression that it is possible.

Set volume
Change the volume of a sound. The volume is given in decibels (dB). A volume of 0 dB is original volume, above 0 dB amplifies the sound, and below 0 dB attenuates the sound. For example, entering a value of -10 plays the audio back 10 dB quieter (about half as loud).


**Also please note, that I only increased the dB level by such a large amount, to make it absolutely obvious this was not working. I wouldn't make such large increases in my project normally!
Last edited by Blacksmith on Tue Sep 08, 2015 5:54 pm, edited 1 time in total.
B
33
S
6
G
7
Posts: 494
Reputation: 8,252

Post » Tue Sep 08, 2015 5:14 pm

You're both right, the manual entry actually contradicted this. I've updated the manual to note amplification is not supported.
Scirra Founder
B
395
S
232
G
88
Posts: 24,368
Reputation: 193,756


Return to Closed bugs

Who is online

Users browsing this forum: No registered users and 2 guests