[FEATURE REQ] Audio object - smooth volume transitions

Discussion and feedback on Construct 2

Post » Mon Oct 24, 2016 7:55 am

I'd like to make a request regarding the audio object - a nice [set volume to ... db in ... seconds] and [stop playing when volume is ...db] would be nice.
I know it can be done via basic coding, but I think it would be a standard function to audio object, without additional lines of code and yet another variable added to a long list.
I also know there are some 3rd party solutions, but incompatible with sound volume units (i.e. native is in db, 3rd party is 0-1) and positioned sound.
B
41
S
14
G
6
Posts: 154
Reputation: 5,546

Post » Thu Oct 27, 2016 1:05 am

I use @rexrainbow 's plugin:
plugin-fade-in-fade-out-audio_t129682?&hilit=audio+helper

I'm guessing you've already tried it since you mentioned that you can't set the volume in db, but you actually can. Just use "0db" (with the apostrophes) instead of 1, for instance.

In case you absolutely NEED some kind of code without a plugin, check this out:
viewtopic.php?f=147&t=85960&p=687953&hilit=music+fade#p687953

I've used this before and it works great but it's really finnicky in some aspects. For instance I had this code so the music would change when the player entered a door and appeared somewhere else, but if he went back quickly before the last fade was over, the music wouldn't change.

Rex's plugin works great for me though, even on Android. Still haven't tested it on iOS though.
B
125
S
43
G
41
Posts: 849
Reputation: 28,260

Post » Wed Nov 02, 2016 3:01 pm

@andreyin Thanks!
Still though - I think this feature should be implemented into official audio object by Scirra, without the need to use 3rd party solutions.
B
41
S
14
G
6
Posts: 154
Reputation: 5,546

Post » Wed Nov 02, 2016 3:04 pm

+1 I agree. Atleast on C3 I hope.
The Things you can create is only limited by your imagination. If you don't have the skills then use your motivation as a natural force to exceed all expectations. Chadori RebornXD
B
65
S
21
G
90
Posts: 1,124
Reputation: 59,862

Post » Thu Nov 03, 2016 1:05 pm

I experience a lot of popping when fading audio via a lerp event, and also popping/cracking when moving towards/away from positioned audio, anyone else?
B
11
S
3
Posts: 135
Reputation: 1,309


Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 11 guests