Audio tagging issues?

Discussion and feedback on Construct 2

Post » Tue May 12, 2015 4:14 pm

I have ran into an issue with my audio lately, and am wondering if it's related to a recent update in construct 2.

I don't have construct in front of me right now, but basically the issue (which wasn't happening before) is that when suspending my game and coming back, it can cause the music to double/triple/etc up.

What I have for an event structure to determine what music is playing in game is kind of like this:

- Player selects world
- Global variable called 'current_world_music' gets assigned value = to the selected world
- On start of level layout there is a check to determine if music playing with the tag = current_music_playing
- If tag isn't playing, play song that has name = the variable's value (which is the world name), and assign tag current_music_playing

Now, after suspending the game an issue tends to crop up where either restarting or getting to the next level causes the music to double up. What sucks is that has only been happening recently, so I'm not 100% on what is exactly causing it.

Is there a more effective way to do what I am doing? Thank you for any tips.
Last edited by blekdar on Wed May 13, 2015 3:03 pm, edited 1 time in total.
B
37
S
5
G
1
Posts: 155
Reputation: 2,140

Post » Tue May 12, 2015 5:01 pm

Another bit I forgot to add.

I also have a mute music button which mutes all audio files associated with the tag "current_music_playing". Now, when this bug occurs the mute button will only mute the doubled up song, but not the original. It's almost like the audio file that was playing lost it's tag? Any one else have an issue like this?
B
37
S
5
G
1
Posts: 155
Reputation: 2,140

Post » Tue May 12, 2015 5:37 pm

Back when I was working on Dethlands, we loaded levels from .tmx files based on 2 dictionary keys "world" and "level". I remember getting all kinds of music bugs when dying/restarting a layout, or restarting the layout to load a new level. Maybe the same thing is going on here.

Unfortunately all I remember doing was adding more variables and conditions...ended up with something that worked. I'll take a look later but I haven't opened the project in over a year :T
Image
B
243
S
30
G
13
Posts: 1,787
Reputation: 18,770

Post » Tue May 12, 2015 6:05 pm

Well what makes it interesting is that it was working very well last month, but within the last few beta updates is when the issue started happening. I don't know if I've just been lucky so far or if a bug was introduced recently.
B
37
S
5
G
1
Posts: 155
Reputation: 2,140

Post » Tue May 12, 2015 11:38 pm

I noticed over the weekend that my audio no longer works when running in NW 10.5. I know, I know, it's not supported any more.... But something 'happened' recently.
A big fan of JavaScript.
B
74
S
20
G
71
Posts: 2,230
Reputation: 44,892

Post » Tue May 12, 2015 11:56 pm

Yeah been getting weird things happening in IE also, audio that worked fine before now just stopping randomly, but good luck pinning it down for a bug report.
If it can be done, someone on the web will show you how to do it!

CDASI Games Mentality Break Splat-a-bug FlapFleet Challenge
B
35
S
13
G
7
Posts: 363
Reputation: 7,283

Post » Wed May 13, 2015 12:52 am

I think I might have actually, I'm gonna research this further.

I loaded up the debug and tracked the audio. When I started a level everything came up fine. Upon switching to another program and/or tab, every single time the music that was playing no longer registered as playing under the audio object, but the music was still playing. As such, when starting the next area the tag comes up as not playing any music, so construct starts up again.
B
37
S
5
G
1
Posts: 155
Reputation: 2,140

Post » Wed May 13, 2015 3:08 pm

Ok, so update after testing on several platforms:

Chrome - Audio plugin loses tags, causes music to double/triple up
iOS using XDK - Same issues after going to homescreen and coming back
Internet Explorer - No looping issue, but audio can sometimes just stop
Firefox - Seems ok
NW.js - No issues as far as I can tell

So I'm not exactly sure where to go with this. Like I said, it was fine before. This is a new issue and I haven't changed any events recently. I may try to see if there's a work around, but honestly I'm kind of annoyed by this, as the issue is not the same across each platform.

@ashley have you heard anything about issues similar to this?
B
37
S
5
G
1
Posts: 155
Reputation: 2,140

Post » Wed May 13, 2015 3:20 pm

No, please report any issues to the Bugs forum following the guidelines so any issues can be investigated. Please make sure you're using the latest release (currently r204.2) to make sure you're not running in to an issue we've already fixed.
Scirra Founder
B
398
S
236
G
88
Posts: 24,439
Reputation: 194,657

Post » Wed May 13, 2015 3:35 pm

@ashley Can do. Once I'm off work today I'll do just that.

And yes I am running 204.2, so here's hoping it's a fixable issue. Thank you!
B
37
S
5
G
1
Posts: 155
Reputation: 2,140


Return to Construct 2 General

Who is online

Users browsing this forum: mihirolover, Yahoo [Bot] and 7 guests