Esempio n. 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));
    }
Esempio n. 2
0
 private static extern int ovrLipSyncDll_ProcessFrameInterleaved(uint context,
                                                                 float [] audioBuffer, ovrLipSyncFlag flags,
                                                                 ref int frameNumber, ref int frameDelay,
                                                                 float [] visemes, int visemeCount);