Changeset 5873


Ignore:
Timestamp:
04/08/14 11:42:25 (6 years ago)
Author:
avneesh-singh
Message:

more refinement to preview before recording & record on subsequent

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Obi/Obi/ProjectView/TransportBar.cs

    r5871 r5873  
    181181        public bool CanPausePlayback { get { return Enabled && mState == State.Playing; } } 
    182182        public bool CanPlay { get { return Enabled && mState == State.Stopped && !m_IsProjectEmpty && !mView.IsContentViewScrollActive; } } 
    183         public bool CanRecord { get { return Enabled &&( mState == State.Stopped || mState == State.Paused ||  mState == State.Monitoring  ||  (mView.ObiForm.Settings.Recording_ReplaceAfterCursor && CurrentState == State.Playing  
     183        public bool CanRecord { get { return Enabled &&( mState == State.Stopped || mState == State.Paused ||  mState == State.Monitoring  ||  (mView.ObiForm.Settings.Audio_UseRecordBtnToRecordOverSubsequentAudio&& CurrentState == State.Playing  
    184184            && mCurrentPlaylist.PlaybackRate == 0)) &&  mView.IsPhraseCountWithinLimit && !mView.IsContentViewScrollActive && !mView.IsZoomWaveformActive; } } // @phraseLimit 
    185185        public bool CanResumePlayback { get { return Enabled && mState == State.Paused   &&   !mView.IsContentViewScrollActive; } } 
    186         public bool CanResumeRecording { get { return Enabled && mResumeRecordingPhrase != null && mResumeRecordingPhrase.IsRooted    &&   (mState != State.Playing  ||   (mView.ObiForm.Settings.Recording_ReplaceAfterCursor && CurrentState == State.Playing) )&& !mView.IsContentViewScrollActive; } } 
     186        public bool CanResumeRecording { get { return Enabled && mResumeRecordingPhrase != null && mResumeRecordingPhrase.IsRooted    &&   (mState != State.Playing  ||   (mView.ObiForm.Settings.Audio_UseRecordBtnToRecordOverSubsequentAudio && CurrentState == State.Playing) )&& !mView.IsContentViewScrollActive; } } 
    187187        public bool CanRewind { get { return Enabled && (IsPlayerActive || CanPlay) ; } } 
    188188        public bool CanStop { get { return Enabled && (mState != State.Stopped || mView.Selection != null); } } 
     
    17001700            if (mView.ObiForm.Settings.RecordDirectlyWithRecordButton && CurrentState != State.Monitoring) //if monitoring go through the traditional way 
    17011701            { 
    1702                 if (mView.ObiForm.Settings.Recording_PreviewBeforeStarting) 
    1703                 { 
    1704                     StartRecordingDirectly(mView.ObiForm.Settings.Recording_PreviewBeforeStarting); 
    1705                 } 
    1706                 else 
     1702                if (mView.ObiForm.Settings.Audio_UseRecordBtnToRecordOverSubsequentAudio 
     1703                    && !mView.ObiForm.Settings.Recording_PreviewBeforeStarting) 
    17071704                { 
    17081705                    if (CurrentState == State.Playing) Pause(); 
    17091706                    RecordOverSubsequentPhrases(); 
    17101707                } 
     1708                else 
     1709                { 
     1710                     
     1711                    StartRecordingDirectly(mView.ObiForm.Settings.Recording_PreviewBeforeStarting); 
     1712                } 
    17111713                 
    17121714            } 
     
    17261728                return; 
    17271729 
    1728             if (mView.ObiForm.Settings.Recording_ReplaceAfterCursor && CurrentState == State.Playing) Pause(); 
     1730            if (mView.ObiForm.Settings.Audio_UseRecordBtnToRecordOverSubsequentAudio && CurrentState == State.Playing) Pause(); 
    17291731 
    17301732            if (mView.Presentation != null&& mState != State.Playing 
     
    19511953            } 
    19521954            // if audio after cursor has to be replaced, delete following phrases command should be used 
    1953             if ((mView.ObiForm.Settings.Recording_ReplaceAfterCursor || deleteFollowingPhrases) 
     1955            if ((deleteFollowingPhrases) 
    19541956                && node is EmptyNode && ((EmptyNode)node).Index < ((EmptyNode)node).ParentAs<SectionNode>().PhraseChildCount-1) 
    19551957            { 
     
    19621964        private void AddTheDeleteSubsequentPhrasesCommand(ObiNode node, bool deleteFollowingPhrases, CompositeCommand command) 
    19631965        { 
    1964             if (mView.ObiForm.Settings.Recording_ReplaceAfterCursor || deleteFollowingPhrases) 
     1966            if (deleteFollowingPhrases) 
    19651967            { 
    19661968                int phraseIndex =(node != null &&   node is EmptyNode)? ((EmptyNode)node).Index + 1: 
Note: See TracChangeset for help on using the changeset viewer.