|
Post by chrisoshea on Oct 7, 2014 14:58:17 GMT
Hi
So I have a sound group mysample played like so:
PlaySoundResult result = MasterAudio.PlaySound("mysample");
is there any way to get the position of the playback of that sample? either as time or percentage?
For example if I had a piece of speech, and I wanted to do lip syncing animation, if I could get the position of the playback of the audio I could trigger visuals to match the audio position.
I know we have: result.ActingVariation.SoundFinished += YourMethodToCall;
I'm thinking more like: result.ActingVariation.SoundPosition += YourMethodToCall;
void YourMethodToCall(float audioPercent){ }
Any thoughts? Thanks!
|
|
|
Post by DarkTonic Dev on Oct 7, 2014 15:32:35 GMT
Sure, the following should work:
if (result.ActingVariation != null) { var pos = result.ActingVariation.audio.time; }
|
|
|
Post by chrisoshea on Oct 7, 2014 16:37:07 GMT
thanks! i found this with a bit of reading, read the flipping manual also I can use audio.GetOutputData for data to help with audio that i emailed you about. thanks.
|
|
|
Post by DarkTonic Dev on Oct 7, 2014 18:02:56 GMT
No problem.
|
|