[NOT SOLVED] Audio Problems

Get help using Construct 2

Post » Mon Aug 27, 2012 5:51 pm

Hey all,

It's the Way of the Sax guy again! I'm having trouble getting sound effects timescale and also layout music to work correctly. I've read all the forum threads and manual entries on the subject, but they either don't explain enough, or the problem is just overlooked and an alternate solution is proposed.

First problem...

When I hit pause in the middle of a fairly lengthy sound effect (as in the truckapproach in layout 2), it would keep playing. What I have done temporarily is to tag all sfx as "sfx" and tell my pause function to Audio: stop "sfx". When I do this, it stops on pause. However, when I unpause, the sound does not return. Music pauses and unpauses correctly. This is like an old NES game where the same problem occurs.

Second problem...

I'm starting to implement a title screen that plays the main theme. When I click the button to start, I can get the main theme music to stop, but I can't for the life of me get the Layout 1 music to play when it's supposed to. If I tell the Main Theme to "stop" on button click, then nothing plays the rest of the comic. If I set it to "muted" on button click, Layout 1 music comes in either late or not at all.

I need music to begin on the start of each layout everytime, and so far this is pretty inconvenient. The only way I know of to fix it is to put all my music in the sounds folder and have the game load everything everytime. Yuck.

Thanks.

capx...

http://www.philipcomposer.com/comic/wayofthesax.capxptbcomposer2012-09-10 23:18:50
B
14
S
5
G
4
Posts: 121
Reputation: 3,938

Post » Wed Aug 29, 2012 12:32 am

come on...anyone?
B
14
S
5
G
4
Posts: 121
Reputation: 3,938

Post » Wed Aug 29, 2012 12:36 am

Audio manipulation, even simple stuff like this, will give you a world of pain in HTML5 at the moment.
Are you prepared to abandon IE support?

In regards to 2, I'm guessing you are not using 'dt' in your expressions. Take a look at this tutorial:
http://www.scirra.com/tutorials/67/delta-time-and-framerate-independence
B
90
S
30
G
24
Posts: 3,189
Reputation: 32,400

Post » Wed Aug 29, 2012 2:33 am

ok, figured out problem 2. Thanks Sqiddster.

Problem 1 still stands.ptbcomposer2012-08-29 02:33:41
B
14
S
5
G
4
Posts: 121
Reputation: 3,938

Post » Wed Aug 29, 2012 1:33 pm

I set up a pretty decent pause. I think I changed the speed of the music to 0 when paused, and back to 1 when unpaused. I don't use stop unless I want it to stop forever.
@bearboxmedia
www.bearboxmedia.com

Nintendo Wii U Developer using Construct 2
B
68
S
8
G
6
Posts: 929
Reputation: 9,356

Post » Wed Aug 29, 2012 8:13 pm

This is what I have already tried. Music pauses and unpauses perfectly. It is files in the sounds folder that do not pause.

Is there anyway to apply a "dt" expression to sound playback?
B
14
S
5
G
4
Posts: 121
Reputation: 3,938

Post » Mon Sep 10, 2012 8:23 pm

problem persists...

Is this a bug or limitation with Construct 2?
B
14
S
5
G
4
Posts: 121
Reputation: 3,938

Post » Mon Sep 10, 2012 9:20 pm

It's always helpful to share a .capx to show what you mean.
Scirra Founder
B
359
S
214
G
72
Posts: 22,946
Reputation: 178,478

Post » Mon Sep 10, 2012 11:19 pm

added capx to OP and also a new audio problem...:)
B
14
S
5
G
4
Posts: 121
Reputation: 3,938

Post » Tue Sep 11, 2012 1:38 am

Hmm, have you tried re-creating the problem in a simple project? It's hard to see where the issue might be occurring in a rather large project like you've posted, but a simple project that demonstrates the issue should be relatively easy.
B
126
S
7
G
4
Posts: 185
Reputation: 7,233

Next

Return to How do I....?

Who is online

Users browsing this forum: CavalierBubble and 19 guests