Audio event suggestion

Discussion and feedback on Construct 2

Post » Thu Jul 12, 2012 8:04 pm

Hi!

I am creating some simple games that require some kind of music or audio sync with text (at some specific ponits in the audio timeline, some text must be displayed). Until now i am playing with a music track, next a numeric variable, with the "do every X secs" event, adding 1 to the variable every sec and checking every tick if the counter reached 20 secs, 45 secs, etc... Although this almost work, it is not reliable on all browers/mobile platforms, and loses sync or starts sooner/later than I want. (I hope i explained it well, my english is not so good )

Do you think it would be possible to add a new event "do at audio playback time X" or something similar? It would be really great.

I think it may be possible to do, reading about the audio tag property "currenttime":
http://www.w3schools.com/html5/av_prop_currenttime.asp

Thank you!!!! Quest2012-07-12 20:05:47
B
8
S
1
Posts: 19
Reputation: 724

Post » Fri Jul 13, 2012 2:42 pm

In the same topic (Audio) It would be also great to have a "pause" audio action.

When I pause the game (with audio/text sync) using "set time scale to 0" the music remain playing. If I stop it, then I must play it from the beginning. Any chance to have the "pause" action?

Thank you! :D
B
8
S
1
Posts: 19
Reputation: 724

Post » Sat Jul 14, 2012 12:50 am

Hi again.

If someone is interested I added a Pause/resume action to built-in audio plugin. I have not attached files because I don't know if it is allowed to post modified offical plugins here.

Note: Altough it is working well on browsers, it is not on CocoonJS (sound pauses, but when resumed the audio plays from start and not from paused point.). As cocoonJS uses API_HTML5 I guessed a simple play() would work as on browsers... :/

Thanks for reading! :D
B
8
S
1
Posts: 19
Reputation: 724

Post » Sat Jul 14, 2012 5:21 am

[QUOTE=Quest] Hi again.

If someone is interested I added a Pause/resume action to built-in audio plugin. I have not attached files because I don't know if it is allowed to post modified offical plugins here.

Note: Altough it is working well on browsers, it is not on CocoonJS (sound pauses, but when resumed the audio plays from start and not from paused point.). As cocoonJS uses API_HTML5 I guessed a simple play() would work as on browsers... :/

Thanks for reading! :D[/QUOTE]
This is a nice feature to be added for when the user changes tabs on the browser. ;]
B
38
S
8
G
3
Posts: 438
Reputation: 6,869


Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 7 guests