Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: phannDOTde on December 13, 2013, 07:22:32 PM

Title: How to unpause Audio [SOLVED]
Post by: phannDOTde on December 13, 2013, 07:22:32 PM
I'm trying to pause an Audio play and it works fine but I cant find out how to unpause it again - any hints?

cheers
Peter
Title: Re: How to unpause Audio
Post by: uberwolfe on December 13, 2013, 08:43:10 PM
Running an Audio Play after Audio Pause will play the sound from where it was paused
Title: Re: How to unpause Audio
Post by: phannDOTde on December 13, 2013, 09:19:37 PM
I'll tryied that it it didnt - I just used Audio Play without any parameters than the Gameobject (so I'll left Volume and Soundfile NONE) expecting that it just uses the current values to continue BUT it sets Volume to zero and never finishes the state at his own.  :-\

(I'm trying to stop the music while pausing with zero timescale)
Title: Re: How to unpause Audio
Post by: jeanfabre on December 14, 2013, 01:09:50 PM
Hi,

 You could fire a "FINISH" event manually? would that work for your case?

bye,

Jean
Title: Re: How to unpause Audio
Post by: phannDOTde on December 14, 2013, 01:18:59 PM
dont think so because the volume is set to 0 after using "audio play" - not sure if its supoused to do that when I use "NONE" for File and Volume

cheers
Title: Re: How to unpause Audio
Post by: jeanfabre on December 14, 2013, 01:35:58 PM
Hi,

 indeed, there is a small logical glitch in this action, it deos check for the "None" first, but then it runs every update and then doesn't check so unless you exit that state before it runs again it will set the volume to 0.

Can you try the action attached to that post? if that works, I'll put it on the right section and will make a ticket for it to go on the next release.

bye,

 Jean
Title: Re: How to unpause Audio
Post by: phannDOTde on December 14, 2013, 01:45:14 PM
Hey Jean,

Awsome, this one works with the Volume. But it doesnt finish the state so I had to add a "wait" with 0,1 Seconds with "realtime" On to jump out there to reset Timescale back to 1 - but this is an acceptable Workaround :-)

Greets
Peter
Title: Re: How to unpause Audio
Post by: phannDOTde on December 14, 2013, 01:48:26 PM
stupid me - of course it doesnt leave the state at timescale 0 - all good - works fine, thanks for the support :-)
Title: Re: How to unpause Audio [SOLVED]
Post by: phannDOTde on December 14, 2013, 02:40:47 PM
hmmm - seems that even with Timescale 1 it doesnt end the state before one audio loop has finished - so there still some issue here it seems  :-\

cheers
peter
Title: Re: How to unpause Audio [SOLVED]
Post by: jeanfabre on December 16, 2013, 05:57:30 AM
Hi,

 I guess, you have to call the finish event manually then. Changing this behavior within this action would break existing project depending on this, as it's actually a feature that it only calls when the clip has finished.

bye,

 Jean