Ejemplo n.º 1
0
        private void SoundPlayerTick(object sender, SoundPlayerTickEventsArgs e)
        {
            Debug.WriteLine($"Elapsed Time: {e.ElapsedTime}");

            TimelineTrackBase track = timeline.GetCurrentPhonemeFromElapsedTime(e.ElapsedTime / 10);

            pbPhonemeImage.Image = track != null?PhonemeTemplate.GetPhonemeImage(track.Name) : LipSyncTimeLineControl.Properties.Resources.Phoneme_None;
        }
Ejemplo n.º 2
0
        private void SoundPlayerTick(object sender, SoundPlayerTickEventsArgs e)
        {
            Debug.WriteLine($"Elapsed Time: {e.ElapsedTime}");

            TimelineTrackBase track = timeline.GetCurrentPhonemeFromElapsedTime(e.ElapsedTime / 10);

            void Action() => btnPhonemeImage.BackgroundImage = track != null?PhonemeTemplate.GetPhonemeImage(track.Name) : LipSyncTimeLineControl.Properties.Resources.Phoneme_None;

            if (InvokeRequired)
            {
                Invoke((Action)Action);
            }
            else
            {
                Action();
            }
        }