예제 #1
0
        public override void Execute()
        {
            ManagedAudioMedia after = mHasAudioAfterDeleted ? mNode.SplitAudio(mSplitTimeEnd) : null;

            mNode.SplitAudio(mSplitTimeBegin);
            if (after != null)
            {
                mNode.MergeAudioWith(after);
            }
            View.Selection = mSelectionAfter;
        }
예제 #2
0
파일: SplitAudio.cs 프로젝트: daisy/obi
 // Perform a split given a time and a node with no audio, optionally updating the selection in the view afterward.
 public static void Split(ProjectView.ProjectView view, PhraseNode node, PhraseNode nodeAfter, Time splitTime,
                          bool updateSelection, bool allowSpecialRoleMarkForSurrounding)
 {
     nodeAfter.Audio = node.SplitAudio(splitTime);
     node.InsertAfterSelf(nodeAfter);
     if (allowSpecialRoleMarkForSurrounding)
     {
         AssignRole.AssignRoleToEmptyNodeSurroundedByCustomRoles(nodeAfter);
     }
     if (updateSelection)
     {
         view.SelectedBlockNode = nodeAfter;
     }
     view.UpdateBlocksLabelInStrip(node.AncestorAs <SectionNode>());
 }