示例#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>());
 }