Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: joduffy on November 16, 2013, 11:40:50 PM

Title: Movie audio not playing
Post by: joduffy on November 16, 2013, 11:40:50 PM
Hi guys,

I have a movie texture with audio but I cannot seem to get the audio part to play at all.

Do I need to do anything extra besides adding a movie texture?

I have tried movie texture audio settings and adding an audio source to the gameobject but no luck.
Title: Re: Movie audio not playing
Post by: jeanfabre on November 18, 2013, 01:55:57 AM
Hi,

 -- What platform are you publishing too? Are you sure you have the right sound codec and all?

-- Can you preview the movie in Unity? does it has sound there?

I seem to remember I had to mess with sounds indeed. Can you try triggering the audi track manually? does that work?


bye,

 Jean
Title: Re: Movie audio not playing
Post by: joduffy on November 18, 2013, 08:30:35 AM
I can get the audio to work if I use the Movie audio action and put an audio source on the object.

The problem is that it now plays the first 1-2 seconds of the audio over and over again(when I press play in unity3d)until i click the movie gameobject. Then it will play the audio and movie fine.

I am using the Vuforia plugin to make it and AR application. But I am just testing it in playmode at the moment.
Title: Re: Movie audio not playing
Post by: jeanfabre on November 19, 2013, 12:58:05 AM
Hi,

 I don't think its related to PlayMaker isn't it?

bye,

 Jean
Title: Re: Movie audio not playing
Post by: joduffy on November 19, 2013, 09:02:30 PM
Hi Jean,

I re-created the scene so that it is not in AR and the same problem is there.
I also can only get the sound to play by adding the 'audio source' to the movie gameobject and putting the movie clip in the audio source.

I also have the 'movie audio action' working alongside the 'play movie action'.

What is the setup I should be using to play the movie? Maybe I am doing it wrong.
Title: Re: Movie audio not playing
Post by: jeanfabre on November 20, 2013, 12:33:43 AM
Hi,

 you are on the right path: I looked up that project and indeed I did the same:

Code: [Select]
                _movieTexture = renderer.material.mainTexture as MovieTexture;
_movieTexture.loop = true;

_movieTexture.Play();
if (_movieTexture.audioClip!=null){
audio.clip = _movieTexture.audioClip;
audio.Play();
}

Bye,

 Jean
Title: Re: Movie audio not playing
Post by: joduffy on November 20, 2013, 05:19:14 AM
Hi Jean,

I followed your code snippet and made a custom action.

The audio now plays. There is a weird jitter or sound mix up at the start and then it plays smooth. The more I play the file while in play mode the less it shows up.

Could the audio be begining to play at one point then reset to the start? Its the only logical thing I can think of.

Thanks for all your help.
Title: Re: Movie audio not playing
Post by: jeanfabre on November 20, 2013, 11:03:38 PM
Hi,

 Thanks for this! Much appreciated that you share back your work!

I am not sure what's happening with the sound jitter. I can't really have a proper look right now as I am travelling, but maybe the audio should be compressed differently, or indeed you could the audio itself having a top at the very beginning, did you made the video yourself?

bye,

 Jean
Title: Re: Movie audio not playing
Post by: joduffy on November 30, 2013, 02:19:38 AM
Thanks Jean,

Sorry for late reply. I'll share any of the scripts that I make.
I did make the video in blender. I have to adjust the lighting though.

I am currently trying to get it to display in AR mode.

I am also trying to get the animation to show seperate in AR mode.