playMaker

Author Topic: How to unpause Audio [SOLVED]  (Read 4844 times)

phannDOTde

  • Full Member
  • ***
  • Posts: 237
    • Peter Hann .de
How to unpause Audio [SOLVED]
« 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
« Last Edit: December 14, 2013, 01:50:14 PM by phannDOTde »

uberwolfe

  • Junior Playmaker
  • **
  • Posts: 59
Re: How to unpause Audio
« Reply #1 on: December 13, 2013, 08:43:10 PM »
Running an Audio Play after Audio Pause will play the sound from where it was paused

phannDOTde

  • Full Member
  • ***
  • Posts: 237
    • Peter Hann .de
Re: How to unpause Audio
« Reply #2 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)

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: How to unpause Audio
« Reply #3 on: December 14, 2013, 01:09:50 PM »
Hi,

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

bye,

Jean

phannDOTde

  • Full Member
  • ***
  • Posts: 237
    • Peter Hann .de
Re: How to unpause Audio
« Reply #4 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

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: How to unpause Audio
« Reply #5 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

phannDOTde

  • Full Member
  • ***
  • Posts: 237
    • Peter Hann .de
Re: How to unpause Audio
« Reply #6 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

phannDOTde

  • Full Member
  • ***
  • Posts: 237
    • Peter Hann .de
Re: How to unpause Audio
« Reply #7 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 :-)

phannDOTde

  • Full Member
  • ***
  • Posts: 237
    • Peter Hann .de
Re: How to unpause Audio [SOLVED]
« Reply #8 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

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: How to unpause Audio [SOLVED]
« Reply #9 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