playMaker

Author Topic: Sound stops working after a few plays  (Read 1805 times)

SpencerPDX

  • Playmaker Newbie
  • *
  • Posts: 22
Sound stops working after a few plays
« on: January 18, 2017, 03:41:25 PM »
Hello!

This may or may not be a Playmaker-related issue; it's certainly keeping Playmaker from working, but I'm not sure if Playmaker is the cause.

We have  an app which involves various real-world scenes with various background noises. Typically I set up the looping ambient sound by dragging a sound file into the hierarchy and making sure it's set to play upon awake and loop. Then my Playmaker events - a sort of tour through the space - happens, and that's all been working well.

Until, that is, we added some more sounds, voice-over triggered within the same Playmaker state machine. These are triggered via Audio Play actions, that specify a game object near the user camera on a child object of an OVRCameraRig, this being an Oculus Rift walk-through. The game object has an Audio Source component on it.

The first time we run through this tour via the editor, it works fine - all sounds are present. After one or two more times, however, the sound will fail to start upon hitting play. By which I mean all sound, background audio as well as voiceover.

And it's not just a lack of volume, the sounds are failing to play: looking in the state machine you can see it get to to the state containing the Audio Play action, and it's stuck there - apparently unable to complete because it can't play the sound it's supposed to play.

The only way I can get sound to work at that point is to restart Unity.

The tour is a sequence of scenes that begins with an intro scene and the rest are daisy-chained together via Playmaker; apparently the overall demo works OK when played this way, it's just repeated starts within the editor that causes the sound to quit.

I did one time get some audio to come back to life by somehow forcing the state machine to continue to a later stage - at that point a later bit of voiceover started playing. But that's not a practical solution for the tour, and besides the background audio never came back on.

This is happening on my machine and a co-worker's. I'm an artist and the co-worker is a coder, and he has concluded it's a Playmaker issue. Certainly it's keeping Playmaker from doing it's thing. For my part, I'm open to the possibility that it's a general Unity issue that's causing it, but I enjoy using Playmaker extensively enough that I skew toward not wanting to see it blamed for problems like this if I can help it. :) The less it's blamed for, the more likely we are to keep using it.

I've searched around online a number of times and haven't found anyone having issues along these lines.

Any help would be greatly appreciated!

terri

  • Sr. Member
  • ****
  • Posts: 386
    • terrivellmann.tumblr.com
Re: Sound stops working after a few plays
« Reply #1 on: January 18, 2017, 04:52:28 PM »
Are you messing with timescale at all? Try setting it to 1 when the bug happens

SpencerPDX

  • Playmaker Newbie
  • *
  • Posts: 22
Re: Sound stops working after a few plays
« Reply #2 on: January 18, 2017, 06:50:17 PM »
Pretty sure we're not messing with timescale, but I'll keep it in mind. Thanks!