playMaker

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

phannDOTde

  • Full Member
  • ***
  • Posts: 234
    • View Profile
    • Peter Hann .de
How to unpause Audio [SOLVED]
« on: December 13, 2013, 05: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, 11:50:14 AM by phannDOTde »

uberwolfe

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

phannDOTde

  • Full Member
  • ***
  • Posts: 234
    • View Profile
    • Peter Hann .de
Re: How to unpause Audio
« Reply #2 on: December 13, 2013, 07: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: 13518
  • Official Playmaker Support
    • View Profile
Re: How to unpause Audio
« Reply #3 on: December 14, 2013, 11:09:50 AM »
Hi,

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

bye,

Jean

phannDOTde

  • Full Member
  • ***
  • Posts: 234
    • View Profile
    • Peter Hann .de
Re: How to unpause Audio
« Reply #4 on: December 14, 2013, 11:18:59 AM »
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: 13518
  • Official Playmaker Support
    • View Profile
Re: How to unpause Audio
« Reply #5 on: December 14, 2013, 11:35:58 AM »
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: 234
    • View Profile
    • Peter Hann .de
Re: How to unpause Audio
« Reply #6 on: December 14, 2013, 11:45:14 AM »
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: 234
    • View Profile
    • Peter Hann .de
Re: How to unpause Audio
« Reply #7 on: December 14, 2013, 11:48:26 AM »
stupid me - of course it doesnt leave the state at timescale 0 - all good - works fine, thanks for the support :-)

phannDOTde

  • Full Member
  • ***
  • Posts: 234
    • View Profile
    • Peter Hann .de
Re: How to unpause Audio [SOLVED]
« Reply #8 on: December 14, 2013, 12: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: 13518
  • Official Playmaker Support
    • View Profile
Re: How to unpause Audio [SOLVED]
« Reply #9 on: December 16, 2013, 03: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