示例#1
0
    /// <summary>
    /// Processes the frame interleaved.
    /// </summary>
    /// <returns>The frame interleaved.</returns>
    /// <param name="context">Context.</param>
    /// <param name="audioBuffer">Audio buffer.</param>
    /// <param name="delayCompensate">If set to <c>true</c> delay compensate.</param>
    /// <param name="frame">Frame.</param>
    public static int ProcessFrameInterleaved(uint context, float [] audioBuffer, ovrLipSyncFlag flags, ref ovrLipSyncFrame frame)
    {
        if (IsInitialized() != ovrLipSyncSuccess)
        {
            return((int)ovrLipSyncError.Unknown);
        }

        // We need to pass the array of Visemes directly into the C call (no pointers of structs allowed, sadly)
        return(ovrLipSyncDll_ProcessFrameInterleaved(context, audioBuffer, flags,
                                                     ref frame.frameNumber, ref frame.frameDelay,
                                                     frame.Visemes, frame.Visemes.Length));
    }
示例#2
0
 public void CopyInput(ref ovrLipSyncFrame input)
 {
     frameNumber = input.frameNumber;
     frameDelay  = input.frameDelay;
     input.Visemes.CopyTo(Visemes, 0);
 }