From: <avn...@us...> - 2007-11-19 10:14:07
|
Revision: 2527 http://urakawa.svn.sourceforge.net/urakawa/?rev=2527&view=rev Author: avneeshsingh Date: 2007-11-19 02:14:04 -0800 (Mon, 19 Nov 2007) Log Message: ----------- Record dialog eliminated and basic recording operational through transport bar Modified Paths: -------------- trunk/urakawa/application/Obi/Obi/ProjectView/TransportBar.cs Modified: trunk/urakawa/application/Obi/Obi/ProjectView/TransportBar.cs =================================================================== --- trunk/urakawa/application/Obi/Obi/ProjectView/TransportBar.cs 2007-11-19 08:31:48 UTC (rev 2526) +++ trunk/urakawa/application/Obi/Obi/ProjectView/TransportBar.cs 2007-11-19 10:14:04 UTC (rev 2527) @@ -445,6 +445,11 @@ /// </summary> public void Pause() { + if (mRecordingSession != null && + (mRecordingSession.AudioRecorder.State == Obi.Audio.AudioRecorderState.Listening || mRecordingSession.AudioRecorder.State == Obi.Audio.AudioRecorderState.Recording)) + { + PauseRecording(); + } if (Enabled) { mCurrentPlaylist.Pause(); @@ -452,36 +457,54 @@ } } + bool m_IsSectionCreatedForRecording; + int m_RecordingInitPhraseIndex ; + SectionNode m_RecordingSection; // Section in which we are recording /// <summary> /// Start listening/recording. /// </summary> public void Record() - { + { + + if (mRecordingSession != null) + { + if (mRecordingSession.AudioRecorder.State == Obi.Audio.AudioRecorderState.Listening) + { + mRecordingSession.Stop(); + StartRecording(); + } + } + else + InitialiseRecord(); + } + + void InitialiseRecord () + { if (CanRecord) { ObiNode selected = mView.Selection.Node; - SectionNode section; // section in which we are recording - int index; // index from which we add new phrases in the aforementioned section - bool IsSectionCreated = false; // Flag to indicate creation of a section as to undo it if nothing is recorded. + //SectionNode section; // section in which we are recording + //int index; // index from which we add new phrases in the aforementioned section + m_IsSectionCreatedForRecording = false; if (selected == null) { // nothing selected: append a new section and start from 0 - section = null; // mProjectPanel.Project.CreateSiblingSectionNode(null); - index = 0; - IsSectionCreated = true; + m_RecordingSection = null; // mProjectPanel.Project.CreateSiblingSectionNode(null); + m_RecordingInitPhraseIndex = 0; + m_IsSectionCreatedForRecording = true; } else if (selected is SectionNode) { // a section is selected: append in the section - section = (SectionNode)selected; - index = section.PhraseChildCount; + m_RecordingSection = (SectionNode)selected; + m_RecordingInitPhraseIndex = m_RecordingSection.PhraseChildCount; } else { // a phrase is selected: inster before the phrase - section = ((PhraseNode)selected).ParentAs<SectionNode>(); - index = ((PhraseNode)selected).Index; + m_RecordingSection = ((PhraseNode)selected).ParentAs<SectionNode>(); + m_RecordingInitPhraseIndex = ((PhraseNode)selected).Index; } Settings settings = ((ObiForm)ParentForm).Settings; mRecordingSession = new RecordingSession(mView.Presentation, mRecorder, @@ -490,7 +513,7 @@ mRecordingSession.StartingPhrase += new Events.Audio.Recorder.StartingPhraseHandler( delegate(object _sender, Obi.Events.Audio.Recorder.PhraseEventArgs _e) { - mView.Presentation.StartRecordingPhrase(_e, section, index + _e.PhraseIndex); + mView.Presentation.StartRecordingPhrase(_e, m_RecordingSection, m_RecordingInitPhraseIndex + _e.PhraseIndex); } ); mRecordingSession.ContinuingPhrase += new Events.Audio.Recorder.ContinuingPhraseHandler( @@ -503,7 +526,7 @@ delegate(object _sender, Obi.Events.Audio.Recorder.PhraseEventArgs _e) { // mProjectPanel.Project.RecordingPhraseUpdate(_e, section, index + _e.PhraseIndex); - mMasterPlaylist.UpdateTimeFrom(section.PhraseChild(index + _e.PhraseIndex).PreviousPhraseInProject); + mMasterPlaylist.UpdateTimeFrom(m_RecordingSection.PhraseChild(m_RecordingInitPhraseIndex + _e.PhraseIndex).PreviousPhraseInProject); } ); mRecordingSession.FinishingPage += new Events.Audio.Recorder.FinishingPageHandler( @@ -514,16 +537,17 @@ } ); - - new Dialogs.TransportRecord(mRecordingSession , mVuMeter).ShowDialog(); + StartListening(); + //new Dialogs.TransportRecord(mRecordingSession , mVuMeter).ShowDialog(); // delete newly created section if nothing is recorded. - // if (mRecordingSession.RecordedAudio.Count == 0 && IsSectionCreated) + // if (mRecordingSession.RecordedAudio.Count == 0 && m_IsSectionCreatedForRecording ) // this.mProjectPanel.ParentObiForm.UndoLast(); - for (int i = 0; i < mRecordingSession.RecordedAudio.Count; ++i) - { - mView.Presentation.UpdateAudioForPhrase(section.PhraseChild(index + i), mRecordingSession.RecordedAudio[i]); - } + // following loop disabled for removing record dialog + //for (int i = 0; i < mRecordingSession.RecordedAudio.Count; ++i) + //{ + //mView.Presentation.UpdateAudioForPhrase(section.PhraseChild(index + i), mRecordingSession.RecordedAudio[i]); + //} /* else //recording using the transportbar buttons { @@ -557,6 +581,71 @@ } } + void StartListening() + { + if (mCurrentPlaylist.State == Obi.Audio.AudioPlayerState.Stopped) + { + mPlayButton.Enabled = false; + mPrevPhraseButton.Enabled = false; + mPrevSectionButton.Enabled = false; + mFastForwardButton.Enabled = false; + mRewindButton.Enabled = false; + ComboFastPlateRate.Enabled = false; + + mRecordButton.AccessibleName = "Start Recording"; + mRecordingSession.Listen(); + } + } + + void StartRecording() + { + mRecordingSession.Record(); + mRecordButton.Enabled = false; + } + + void PauseRecording() + { + mRecordingSession.Stop(); + + mRecordingSession.Listen(); + mRecordButton.Enabled = true; + mRecordButton.AccessibleName = "Start Recording"; + + } + + void StopRecording() + { + if (mRecordingSession != null && + (mRecordingSession.AudioRecorder.State == Obi.Audio.AudioRecorderState.Listening || mRecordingSession.AudioRecorder.State == Obi.Audio.AudioRecorderState.Recording)) + { + mRecordingSession.Stop(); + + // delete newly created section if nothing is recorded. + if (mRecordingSession.RecordedAudio.Count == 0 && m_IsSectionCreatedForRecording) + this.mView.ObiForm.UndoLast(); + + // update phrases with audio assets + for (int i = 0; i < mRecordingSession.RecordedAudio.Count; ++i) + { + mView.Presentation.UpdateAudioForPhrase(m_RecordingSection.PhraseChild(m_RecordingInitPhraseIndex + i), mRecordingSession.RecordedAudio[i]); + } + + m_IsSectionCreatedForRecording = false; + mRecordButton.Enabled = true; + mRecordButton.AccessibleName = "Record"; + mRecordingSession = null; + + // enable playback controls + mPlayButton.Enabled = true; + mPrevPhraseButton.Enabled = true; + mPrevSectionButton.Enabled = true; + mFastForwardButton.Enabled = true; + mRewindButton.Enabled = true; + ComboFastPlateRate.Enabled = true; + } + } + + public void UpdateInlineRecordingState() { if (IsInlineRecording) @@ -588,6 +677,11 @@ /// </summary> public void Stop() { + if (mRecordingSession != null && + (mRecordingSession.AudioRecorder.State == Obi.Audio.AudioRecorderState.Listening || mRecordingSession.AudioRecorder.State == Obi.Audio.AudioRecorderState.Recording)) + { + StopRecording(); + } if (IsInlineRecording) { inlineRecordingSession.Stop(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <avn...@us...> - 2007-11-20 14:32:14
|
Revision: 2534 http://urakawa.svn.sourceforge.net/urakawa/?rev=2534&view=rev Author: avneeshsingh Date: 2007-11-20 06:32:05 -0800 (Tue, 20 Nov 2007) Log Message: ----------- Update to transportbar recording. Split command needed for implementing Insert mode Modified Paths: -------------- trunk/urakawa/application/Obi/Obi/ProjectView/TransportBar.cs Modified: trunk/urakawa/application/Obi/Obi/ProjectView/TransportBar.cs =================================================================== --- trunk/urakawa/application/Obi/Obi/ProjectView/TransportBar.cs 2007-11-20 10:54:46 UTC (rev 2533) +++ trunk/urakawa/application/Obi/Obi/ProjectView/TransportBar.cs 2007-11-20 14:32:05 UTC (rev 2534) @@ -466,7 +466,6 @@ /// </summary> public void Record() { - if (mRecordingSession != null) { if (mRecordingSession.AudioRecorder.State == Obi.Audio.AudioRecorderState.Listening) @@ -476,10 +475,28 @@ } } else - InitialiseRecord(); + InitialiseRecord( false ); + } + + + /// <summary> + /// Start recording directly without initialising listening + /// </summary> + public void RecordDirectly () + { + if (mRecordingSession == null) + { + InitialiseRecord(true); + } } - void InitialiseRecord () + /// <summary> + /// prepare for recording and + /// start listening if parameter is false + /// else start recording directly + /// </summary> + /// <param name="IsDirectRecording"></param> + void InitialiseRecord ( bool IsDirectRecording ) { if (CanRecord) { @@ -537,17 +554,15 @@ } ); + if (IsDirectRecording) + { + StartRecording(); + DisablePlaybackButtonsForRecording(); + } + else + StartListening(); + - StartListening(); - //new Dialogs.TransportRecord(mRecordingSession , mVuMeter).ShowDialog(); - // delete newly created section if nothing is recorded. - // if (mRecordingSession.RecordedAudio.Count == 0 && m_IsSectionCreatedForRecording ) - // this.mProjectPanel.ParentObiForm.UndoLast(); - // following loop disabled for removing record dialog - //for (int i = 0; i < mRecordingSession.RecordedAudio.Count; ++i) - //{ - //mView.Presentation.UpdateAudioForPhrase(section.PhraseChild(index + i), mRecordingSession.RecordedAudio[i]); - //} /* else //recording using the transportbar buttons { @@ -585,18 +600,23 @@ { if (mCurrentPlaylist.State == Obi.Audio.AudioPlayerState.Stopped) { - mPlayButton.Enabled = false; - mPrevPhraseButton.Enabled = false; - mPrevSectionButton.Enabled = false; - mFastForwardButton.Enabled = false; - mRewindButton.Enabled = false; - ComboFastPlateRate.Enabled = false; - - mRecordButton.AccessibleName = "Start Recording"; + DisablePlaybackButtonsForRecording(); + mRecordButton.AccessibleName = "Start Recording"; mRecordingSession.Listen(); } } + private void DisablePlaybackButtonsForRecording () + { + mPlayButton.Enabled = false; + mPrevPhraseButton.Enabled = false; + mPrevSectionButton.Enabled = false; + mFastForwardButton.Enabled = false; + mRewindButton.Enabled = false; + ComboFastPlateRate.Enabled = false; + + } + void StartRecording() { mRecordingSession.Record(); @@ -732,9 +752,9 @@ /// </summary> public void NextPhrase() { - if (IsInlineRecording) + if ( mRecordingSession != null && mRecordingSession.AudioRecorder.State == Obi.Audio.AudioRecorderState.Recording ) { - inlineRecordingSession.NextPhrase(); + mRecordingSession.NextPhrase(); } else { @@ -749,7 +769,11 @@ /// </summary> public void NextSection() { - if (!IsInlineRecording) + if (mRecordingSession != null && mRecordingSession.AudioRecorder.State == Obi.Audio.AudioRecorderState.Recording) + { + // mark section + } + else { mIsSerialPlaying = true; if (Enabled) mCurrentPlaylist.NavigateToNextSection(); @@ -839,11 +863,7 @@ mTimeDisplayBox.Focus(); } - private void mRecordModeBox_SelectedIndexChanged(object sender, EventArgs e) - { - } - public bool FastPlayRateStepUp() { if (ComboFastPlateRate.SelectedIndex < ComboFastPlateRate.Items.Count - 1) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <avn...@us...> - 2007-11-27 07:30:20
|
Revision: 2552 http://urakawa.svn.sourceforge.net/urakawa/?rev=2552&view=rev Author: avneeshsingh Date: 2007-11-26 23:30:17 -0800 (Mon, 26 Nov 2007) Log Message: ----------- Prepration for insert recording Modified Paths: -------------- trunk/urakawa/application/Obi/Obi/ProjectView/TransportBar.cs Modified: trunk/urakawa/application/Obi/Obi/ProjectView/TransportBar.cs =================================================================== --- trunk/urakawa/application/Obi/Obi/ProjectView/TransportBar.cs 2007-11-27 05:00:20 UTC (rev 2551) +++ trunk/urakawa/application/Obi/Obi/ProjectView/TransportBar.cs 2007-11-27 07:30:17 UTC (rev 2552) @@ -107,7 +107,7 @@ ( (mCurrentPlaylist.State == Audio.AudioPlayerState.Stopped ) || - (!IsInlineRecording ) + (mCurrentPlaylist.State == Audio.AudioPlayerState.Paused ) ); } } @@ -730,6 +730,7 @@ /// </summary> public void Record() { + if (mRecordingSession != null) { if (mRecordingSession.AudioRecorder.State == Obi.Audio.AudioRecorderState.Listening) @@ -740,7 +741,9 @@ } else { + PrepareForRecording(false); + } } @@ -756,9 +759,11 @@ // Prepare for recording and return the corresponding recording command. private void PrepareForRecording(bool startRecording) { - if (!CanRecord) return; + if (!CanRecord) return; mRecordingCommand = CreateRecordingCommand(); + ObiNode selected = mView.SelectionNode; + // If nothing is selected, create a new section to record in. if (selected == null) { @@ -779,7 +784,14 @@ else if (selected is PhraseNode) { mRecordingSection = selected.ParentAs<SectionNode>(); - mRecordingInitPhraseIndex = 1 + selected.Index; + if (mCurrentPlaylist.State == Obi.Audio.AudioPlayerState.Paused) + { + // split + mCurrentPlaylist.Stop(); + mRecordingInitPhraseIndex = selected.Index; + } + else + mRecordingInitPhraseIndex = 1 + selected.Index; } Settings settings = mView.ObiForm.Settings; mRecordingSession = new RecordingSession(mView.Presentation, mRecorder, This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <avn...@us...> - 2007-11-27 12:39:35
|
Revision: 2556 http://urakawa.svn.sourceforge.net/urakawa/?rev=2556&view=rev Author: avneeshsingh Date: 2007-11-27 04:39:33 -0800 (Tue, 27 Nov 2007) Log Message: ----------- Playback works during paused recording Modified Paths: -------------- trunk/urakawa/application/Obi/Obi/ProjectView/TransportBar.cs Modified: trunk/urakawa/application/Obi/Obi/ProjectView/TransportBar.cs =================================================================== --- trunk/urakawa/application/Obi/Obi/ProjectView/TransportBar.cs 2007-11-27 12:17:56 UTC (rev 2555) +++ trunk/urakawa/application/Obi/Obi/ProjectView/TransportBar.cs 2007-11-27 12:39:33 UTC (rev 2556) @@ -470,12 +470,18 @@ ComboFastPlateRate.Enabled = false; } - + PhraseNode m_ResumerecordingPhrase ; void PauseRecording() { mRecordingSession.Stop(); - - mRecordingSession.Listen(); + for (int i = 0; i < mRecordingSession.RecordedAudio.Count; ++i) + { + mView.Presentation.UpdateAudioForPhrase(mRecordingSection.PhraseChild(mRecordingInitPhraseIndex + i), + mRecordingSession.RecordedAudio[i]); + } + m_ResumerecordingPhrase = mRecordingSection.PhraseChild(mRecordingInitPhraseIndex + mRecordingSession.RecordedAudio.Count - 1 ); + mRecordingSession = null; + //mRecordingSession.Listen(); mRecordButton.Enabled = true; mRecordButton.AccessibleName = "Start Recording"; @@ -738,12 +744,15 @@ mRecordingSession.Stop(); StartRecording(); } - } + } + else if (m_ResumerecordingPhrase != null) + { + PrepareForRecording(true, m_ResumerecordingPhrase); + } else { + PrepareForRecording(false , null ); - PrepareForRecording(false); - } } @@ -757,12 +766,13 @@ urakawa.undo.CompositeCommand mRecordingCommand; // Prepare for recording and return the corresponding recording command. - private void PrepareForRecording(bool startRecording) + private void PrepareForRecording(bool startRecording, ObiNode selected ) { if (!CanRecord) return; mRecordingCommand = CreateRecordingCommand(); - ObiNode selected = mView.SelectionNode; + if ( selected == null ) + selected = mView.SelectionNode; // If nothing is selected, create a new section to record in. if (selected == null) @@ -855,6 +865,7 @@ mRecordButton.Enabled = true; mRecordButton.AccessibleName = Localizer.Message("record"); mRecordingSession = null; + m_ResumerecordingPhrase = null; // enable playback controls mPlayButton.Enabled = true; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <avn...@us...> - 2007-11-29 03:58:49
|
Revision: 2574 http://urakawa.svn.sourceforge.net/urakawa/?rev=2574&view=rev Author: avneeshsingh Date: 2007-11-28 19:58:46 -0800 (Wed, 28 Nov 2007) Log Message: ----------- Insert recording starts working Modified Paths: -------------- trunk/urakawa/application/Obi/Obi/ProjectView/TransportBar.cs Modified: trunk/urakawa/application/Obi/Obi/ProjectView/TransportBar.cs =================================================================== --- trunk/urakawa/application/Obi/Obi/ProjectView/TransportBar.cs 2007-11-29 03:29:23 UTC (rev 2573) +++ trunk/urakawa/application/Obi/Obi/ProjectView/TransportBar.cs 2007-11-29 03:58:46 UTC (rev 2574) @@ -809,11 +809,14 @@ mRecordingSection = selected.ParentAs<SectionNode>(); if (mCurrentPlaylist.State == Obi.Audio.AudioPlayerState.Paused) { - // split - mCurrentPlaylist.Stop(); - mRecordingInitPhraseIndex = selected.Index; + if (mView.Selection.Waveform.HasCursor) + { + mView.Presentation.UndoRedoManager.execute(new Commands.Node.SplitAudio(mView )); + mCurrentPlaylist.Stop(); + //mRecordingInitPhraseIndex = selected.Index; + } } - else + mRecordingInitPhraseIndex = 1 + selected.Index; } Settings settings = mView.ObiForm.Settings; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <avn...@us...> - 2007-12-10 06:47:54
|
Revision: 2613 http://urakawa.svn.sourceforge.net/urakawa/?rev=2613&view=rev Author: avneeshsingh Date: 2007-12-09 22:47:52 -0800 (Sun, 09 Dec 2007) Log Message: ----------- MarkIn/MarkOut support added for playing a selection of aphrase. Modified Paths: -------------- trunk/urakawa/application/Obi/Obi/ProjectView/TransportBar.cs Modified: trunk/urakawa/application/Obi/Obi/ProjectView/TransportBar.cs =================================================================== --- trunk/urakawa/application/Obi/Obi/ProjectView/TransportBar.cs 2007-12-10 06:11:04 UTC (rev 2612) +++ trunk/urakawa/application/Obi/Obi/ProjectView/TransportBar.cs 2007-12-10 06:47:52 UTC (rev 2613) @@ -21,6 +21,9 @@ private NodeSelection mPlayingFrom; // selection before playback started private SectionNode mCurrentPlayingSection; // holds section currently being played for highlighting it in TOC view while playing + private double m_AudioMarkIn; + private double m_AudioMarkOut; + // A non fluctuating flag to be set till playing of assets in serial is continued // it is true while a series of assets are being played but false when only single asset is played // so it is true for play all command and true for play node command when node is section @@ -82,6 +85,7 @@ mDisplayBox.SelectedIndex = ElapsedTotal; mTimeDisplayBox.AccessibleName = mDisplayBox.SelectedItem.ToString(); mVUMeterPanel.VuMeter = mVuMeter; + m_AudioMarkIn = m_AudioMarkOut = -1 ; ComboFastPlateRate.Items.Add("1.0"); ComboFastPlateRate.Items.Add("1.125"); @@ -170,8 +174,36 @@ public Playlist MasterPlaylist { get { return mMasterPlaylist; } } + public double MarkINTime + { + get + { + return m_AudioMarkIn; + } + set + { + if (value >= 0 + && value < mView.SelectedBlockNode.Audio.getDuration().getTimeDeltaAsMillisecondFloat()) + m_AudioMarkIn = value; + } + } + public double MarkOutTime + { + get + { + return m_AudioMarkOut; + } + set + { + if ( m_AudioMarkIn > -1 + && value > m_AudioMarkIn + && value < mView.SelectedBlockNode.Audio.getDuration().getTimeDeltaAsMillisecondFloat()) + m_AudioMarkOut = value; + } + } + #region selection public NodeSelection Selection @@ -247,7 +279,8 @@ mView.SelectedBlockNode = e.Node; mView.PlaybackBlock = e.Node; mDisplayTime = 0.0; - } + m_AudioMarkIn = m_AudioMarkOut = -1; + } // Update the transport bar according to the player state. private void Play_PlayerStateChanged(object sender, Obi.Events.Audio.Player.StateChangedEventArgs e) @@ -755,9 +788,13 @@ public bool PlayPreviewSelectedFragment() { // add code for playing between markings - //mCurrentPlaylist.PreviewSelectedFragment(1000, 2000); - - return true; + if ( m_AudioMarkIn > -1 && m_AudioMarkOut > -1 + && m_AudioMarkIn < m_AudioMarkOut) + { + mCurrentPlaylist.PreviewSelectedFragment( m_AudioMarkIn , m_AudioMarkOut ); + return true; + } + return false; } public bool PlayPreviewUptoCurrentPosition() This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <avn...@us...> - 2007-12-12 06:10:04
|
Revision: 2640 http://urakawa.svn.sourceforge.net/urakawa/?rev=2640&view=rev Author: avneeshsingh Date: 2007-12-11 22:09:58 -0800 (Tue, 11 Dec 2007) Log Message: ----------- minor updates to transportBar to avoid AudioSelection crashes Modified Paths: -------------- trunk/urakawa/application/Obi/Obi/ProjectView/TransportBar.cs Modified: trunk/urakawa/application/Obi/Obi/ProjectView/TransportBar.cs =================================================================== --- trunk/urakawa/application/Obi/Obi/ProjectView/TransportBar.cs 2007-12-12 01:30:26 UTC (rev 2639) +++ trunk/urakawa/application/Obi/Obi/ProjectView/TransportBar.cs 2007-12-12 06:09:58 UTC (rev 2640) @@ -744,13 +744,24 @@ // preview playback functions + + private bool IsInPhraseSelectionMarked + { + get + { + if (mView.Selection != null + && mView.Selection is AudioSelection + && ((AudioSelection)mView.Selection).WaveformSelection.HasCursor) + return true; + else + return false; + } + } - public bool MarkSelectionBeginTime () { - if ( ((AudioSelection)mView.Selection) != null - && ((AudioSelection)mView.Selection).WaveformSelection.HasCursor) - { + if ( IsInPhraseSelectionMarked ) + { ((AudioSelection)mView.Selection).WaveformSelection.SelectionBeginTime = ((AudioSelection)mView.Selection).WaveformSelection.CursorTime ; return true; } @@ -759,9 +770,8 @@ public bool MarkSelectionEndTime() { - if (((AudioSelection)mView.Selection) != null - && ((AudioSelection)mView.Selection).WaveformSelection.HasCursor - && mCurrentPlaylist.CurrentTimeInAsset > ((AudioSelection)mView.Selection).WaveformSelection.SelectionBeginTime ) + if ( IsInPhraseSelectionMarked + && mCurrentPlaylist.CurrentTimeInAsset > ((AudioSelection)mView.Selection).WaveformSelection.SelectionBeginTime ) { ((AudioSelection)mView.Selection).WaveformSelection.SelectionEndTime = ((AudioSelection)mView.Selection).WaveformSelection.CursorTime ; return true; @@ -772,9 +782,8 @@ public bool PlayPreviewFromCurrentPosition() { - if ((mView.Selection) != null - && ((AudioSelection)mView.Selection).WaveformSelection.HasCursor) - { + if ( IsInPhraseSelectionMarked ) + { mCurrentPlaylist.PreviewFromCurrentPosition(((AudioSelection)mView.Selection).WaveformSelection.CursorTime, m_PreviewDuration); return true; } @@ -783,8 +792,7 @@ public bool PlayPreviewSelectedFragment() { - // add code for playing between markings - if (( mView.Selection) != null + if ( IsInPhraseSelectionMarked && ((AudioSelection)mView.Selection).WaveformSelection.SelectionBeginTime < ((AudioSelection)mView.Selection).WaveformSelection.SelectionEndTime ) { mCurrentPlaylist.PreviewSelectedFragment(((AudioSelection)mView.Selection).WaveformSelection.SelectionBeginTime, ((AudioSelection)mView.Selection).WaveformSelection.SelectionEndTime ); @@ -795,9 +803,8 @@ public bool PlayPreviewUptoCurrentPosition() { - if ((mView.Selection) != null - && ((AudioSelection)mView.Selection).WaveformSelection.HasCursor) - { + if ( IsInPhraseSelectionMarked ) + { mCurrentPlaylist.PreviewUptoCurrentPosition(((AudioSelection)mView.Selection).WaveformSelection.CursorTime , m_PreviewDuration); return true; } @@ -870,9 +877,8 @@ else if (selected is PhraseNode) { mRecordingSection = selected.ParentAs<SectionNode>(); - if (mCurrentPlaylist.State == Obi.Audio.AudioPlayerState.Paused) - { - if (((AudioSelection)mView.Selection) != null && ((AudioSelection)mView.Selection).WaveformSelection.HasCursor) + + if ( IsInPhraseSelectionMarked ) { if (((AudioSelection)mView.Selection).WaveformSelection.SelectionEndTime != 0 && ((AudioSelection)mView.Selection).WaveformSelection.SelectionBeginTime < ((AudioSelection)mView.Selection).WaveformSelection.SelectionEndTime) @@ -883,12 +889,13 @@ else mView.Presentation.UndoRedoManager.execute(new Commands.Node.SplitAudio(mView )); - + + if ( mCurrentPlaylist.State == Audio.AudioPlayerState.Paused ) mCurrentPlaylist.Stop(); - + } - } + mRecordingInitPhraseIndex = 1 + selected.Index; } Settings settings = mView.ObiForm.Settings; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <avn...@us...> - 2007-12-13 09:15:35
|
Revision: 2656 http://urakawa.svn.sourceforge.net/urakawa/?rev=2656&view=rev Author: avneeshsingh Date: 2007-12-13 01:15:30 -0800 (Thu, 13 Dec 2007) Log Message: ----------- On the fly phrase and page marking works while recording but need to make it more intellegent. Modified Paths: -------------- trunk/urakawa/application/Obi/Obi/ProjectView/TransportBar.cs Modified: trunk/urakawa/application/Obi/Obi/ProjectView/TransportBar.cs =================================================================== --- trunk/urakawa/application/Obi/Obi/ProjectView/TransportBar.cs 2007-12-13 09:07:17 UTC (rev 2655) +++ trunk/urakawa/application/Obi/Obi/ProjectView/TransportBar.cs 2007-12-13 09:15:30 UTC (rev 2656) @@ -906,10 +906,25 @@ delegate(object _sender, Obi.Events.Audio.Recorder.PhraseEventArgs _e) { PhraseNode phrase = mView.Presentation.CreatePhraseNode(_e.Audio); - mRecordingCommand.append(new Commands.Node.AddNode(mView, phrase, mRecordingSection, - mRecordingInitPhraseIndex + _e.PhraseIndex)); - mView.Presentation.UndoRedoManager.execute(mRecordingCommand); + + if (_e.PhraseIndex > 0) + { + mView.Presentation.UndoRedoManager.execute(new Commands.Node.AddNode(mView, phrase, mRecordingSection, + mRecordingInitPhraseIndex + _e.PhraseIndex) ); + } + else + { + mRecordingCommand.append(new Commands.Node.AddNode(mView, phrase, mRecordingSection, + mRecordingInitPhraseIndex + _e.PhraseIndex)); + mView.Presentation.UndoRedoManager.execute(mRecordingCommand); + } }); + + mRecordingSession.FinishingPage += new Events.Audio.Recorder.FinishingPageHandler ( + delegate(object _sender, Obi.Events.Audio.Recorder.PhraseEventArgs _e) + { + SetPageNumberWhileRecording(_e); + }); if (startRecording) { StartRecording(); @@ -920,6 +935,12 @@ } } + private void SetPageNumberWhileRecording( Obi.Events.Audio.Recorder.PhraseEventArgs e ) + { + int PageNumber = mView.Presentation.PageNumberFor(mRecordingSection.PhraseChild(mRecordingInitPhraseIndex + e.PhraseIndex)) ; + urakawa.undo.ICommand cmd = new Commands.Node.SetPageNumber(mView, mRecordingSection.PhraseChild(mRecordingInitPhraseIndex + e.PhraseIndex ) , PageNumber ); + } + // Start listening private void StartListening() { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <avn...@us...> - 2007-12-16 08:29:06
|
Revision: 2689 http://urakawa.svn.sourceforge.net/urakawa/?rev=2689&view=rev Author: avneeshsingh Date: 2007-12-16 00:29:02 -0800 (Sun, 16 Dec 2007) Log Message: ----------- On the fly section marking added for recording Modified Paths: -------------- trunk/urakawa/application/Obi/Obi/ProjectView/TransportBar.cs Modified: trunk/urakawa/application/Obi/Obi/ProjectView/TransportBar.cs =================================================================== --- trunk/urakawa/application/Obi/Obi/ProjectView/TransportBar.cs 2007-12-16 07:18:37 UTC (rev 2688) +++ trunk/urakawa/application/Obi/Obi/ProjectView/TransportBar.cs 2007-12-16 08:29:02 UTC (rev 2689) @@ -603,6 +603,9 @@ if (mRecordingSession != null && mRecordingSession.AudioRecorder.State == Obi.Audio.AudioRecorderState.Recording) { // mark section + PauseRecording(); + mView.Presentation.UndoRedoManager.execute(new Commands.Node.AddNewSection(mView)); + PrepareForRecording(true, null); } else { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <avn...@us...> - 2007-12-18 09:38:09
|
Revision: 2713 http://urakawa.svn.sourceforge.net/urakawa/?rev=2713&view=rev Author: avneeshsingh Date: 2007-12-18 01:38:06 -0800 (Tue, 18 Dec 2007) Log Message: ----------- Added missing AppendOnlyRecording flag Modified Paths: -------------- trunk/urakawa/application/Obi/Obi/ProjectView/TransportBar.cs Modified: trunk/urakawa/application/Obi/Obi/ProjectView/TransportBar.cs =================================================================== --- trunk/urakawa/application/Obi/Obi/ProjectView/TransportBar.cs 2007-12-18 08:37:15 UTC (rev 2712) +++ trunk/urakawa/application/Obi/Obi/ProjectView/TransportBar.cs 2007-12-18 09:38:06 UTC (rev 2713) @@ -29,10 +29,13 @@ private bool mIsSerialPlaying = false; private bool m_PlayOnFocusEnabled = true; // Avn: for controlling triggering of OnFocus playback. + + private int m_PreviewDuration = 1500; // duration of preview playback, to be included in settings. + private bool m_IsAppendOnlyRecording; RecordingSession inlineRecordingSession = null; // LNN: hack for doing non-dialog recording. public bool IsInlineRecording { get { return (inlineRecordingSession != null); } } - private int m_PreviewDuration = 1500; // duration of preview playback, to be included in settings. + // constants from the display combo box private static readonly int Elapsed = 0; @@ -81,6 +84,9 @@ mTimeDisplayBox.AccessibleName = mDisplayBox.SelectedItem.ToString(); mVUMeterPanel.VuMeter = mVuMeter; + // Append recording flag: to be updated from settings. Put to false for time being. + m_IsAppendOnlyRecording = false; + ComboFastPlateRate.Items.Add("1.0"); ComboFastPlateRate.Items.Add("1.125"); ComboFastPlateRate.Items.Add("1.25"); @@ -120,6 +126,16 @@ } } + + /// <summary> + /// flag to enable / disable append only recording mode for less skilled users + /// </summary> + public bool AppendOnlyRecording + { + get { return m_IsAppendOnlyRecording ; } + set { m_IsAppendOnlyRecording = value ; } + } + public Playlist CurrentPlaylist { get { return mCurrentPlaylist; } } /// <summary> @@ -879,7 +895,7 @@ { mRecordingSection = selected.ParentAs<SectionNode>(); - if ( IsInPhraseSelectionMarked ) + if ( m_IsAppendOnlyRecording && IsInPhraseSelectionMarked ) { if (((AudioSelection)mView.Selection).WaveformSelection.SelectionEndTime != 0 && ((AudioSelection)mView.Selection).WaveformSelection.SelectionBeginTime < ((AudioSelection)mView.Selection).WaveformSelection.SelectionEndTime) @@ -889,14 +905,11 @@ } else mView.Presentation.UndoRedoManager.execute(new Commands.Node.SplitAudio(mView )); - - - if ( mCurrentPlaylist.State == Audio.AudioPlayerState.Paused ) - mCurrentPlaylist.Stop(); } + if (mCurrentPlaylist.State == Audio.AudioPlayerState.Paused) + mCurrentPlaylist.Stop(); - mRecordingInitPhraseIndex = 1 + selected.Index; } Settings settings = mView.ObiForm.Settings; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <avn...@us...> - 2007-12-18 09:41:21
|
Revision: 2714 http://urakawa.svn.sourceforge.net/urakawa/?rev=2714&view=rev Author: avneeshsingh Date: 2007-12-18 01:41:20 -0800 (Tue, 18 Dec 2007) Log Message: ----------- very minor update for mistake done in Append recording flag check Modified Paths: -------------- trunk/urakawa/application/Obi/Obi/ProjectView/TransportBar.cs Modified: trunk/urakawa/application/Obi/Obi/ProjectView/TransportBar.cs =================================================================== --- trunk/urakawa/application/Obi/Obi/ProjectView/TransportBar.cs 2007-12-18 09:38:06 UTC (rev 2713) +++ trunk/urakawa/application/Obi/Obi/ProjectView/TransportBar.cs 2007-12-18 09:41:20 UTC (rev 2714) @@ -895,7 +895,7 @@ { mRecordingSection = selected.ParentAs<SectionNode>(); - if ( m_IsAppendOnlyRecording && IsInPhraseSelectionMarked ) + if ( !m_IsAppendOnlyRecording && IsInPhraseSelectionMarked ) { if (((AudioSelection)mView.Selection).WaveformSelection.SelectionEndTime != 0 && ((AudioSelection)mView.Selection).WaveformSelection.SelectionBeginTime < ((AudioSelection)mView.Selection).WaveformSelection.SelectionEndTime) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <avn...@us...> - 2007-12-29 14:23:33
|
Revision: 2775 http://urakawa.svn.sourceforge.net/urakawa/?rev=2775&view=rev Author: avneeshsingh Date: 2007-12-29 06:23:30 -0800 (Sat, 29 Dec 2007) Log Message: ----------- Update to play selection. Need to tryout selection behaviour before combining play Modified Paths: -------------- trunk/urakawa/application/Obi/Obi/ProjectView/TransportBar.cs Modified: trunk/urakawa/application/Obi/Obi/ProjectView/TransportBar.cs =================================================================== --- trunk/urakawa/application/Obi/Obi/ProjectView/TransportBar.cs 2007-12-28 08:28:24 UTC (rev 2774) +++ trunk/urakawa/application/Obi/Obi/ProjectView/TransportBar.cs 2007-12-29 14:23:30 UTC (rev 2775) @@ -450,8 +450,12 @@ mCurrentPlaylist.CurrentPhrase = mLocalPlaylist.FirstPhrase; // Avn: condition added on 13 may 2007 if (mCurrentPlaylist.PhraseList.Count > 1) mIsSerialPlaying = true; - + if (mView.Selection is AudioSelection + && ((AudioSelection)mView.Selection).AudioRange.HasCursor + && ((AudioSelection)mView.Selection).AudioRange.SelectionEndTime > ((AudioSelection)mView.Selection).AudioRange.SelectionBeginTime) + mCurrentPlaylist.PreviewSelectedFragment(((AudioSelection)mView.Selection).AudioRange.SelectionBeginTime, ((AudioSelection)mView.Selection).AudioRange.SelectionEndTime); + else if (mView.Selection is AudioSelection && ((AudioSelection)mView.Selection).AudioRange.HasCursor) mCurrentPlaylist.Play(((AudioSelection)mView.Selection).AudioRange.CursorTime); else This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <avn...@us...> - 2008-01-01 10:42:29
|
Revision: 2791 http://urakawa.svn.sourceforge.net/urakawa/?rev=2791&view=rev Author: avneeshsingh Date: 2008-01-01 02:42:25 -0800 (Tue, 01 Jan 2008) Log Message: ----------- Fixed bugg of starting Fwd/Rwd at stop state. Need to review behaviour of playback starting from strip cursor Modified Paths: -------------- trunk/urakawa/application/Obi/Obi/ProjectView/TransportBar.cs Modified: trunk/urakawa/application/Obi/Obi/ProjectView/TransportBar.cs =================================================================== --- trunk/urakawa/application/Obi/Obi/ProjectView/TransportBar.cs 2007-12-31 12:56:02 UTC (rev 2790) +++ trunk/urakawa/application/Obi/Obi/ProjectView/TransportBar.cs 2008-01-01 10:42:25 UTC (rev 2791) @@ -383,6 +383,9 @@ { if (Enabled) { + if (mCurrentPlaylist.Audioplayer.State == Obi.Audio.AudioPlayerState.Stopped) + Play(); + mIsSerialPlaying = true; mCurrentPlaylist.Rewind(); } @@ -671,6 +674,9 @@ { if (Enabled && !IsInlineRecording) { + if ( mCurrentPlaylist.Audioplayer.State == Obi.Audio.AudioPlayerState.Stopped ) + Play(); + mIsSerialPlaying = true; mCurrentPlaylist.FastForward(); } @@ -815,7 +821,7 @@ mDisplayBox.SelectedIndex = mDisplayBox.Items.Count - 1; else if ( mDisplayBox.SelectedIndex == mDisplayBox.Items.Count - 1 ) { - mDisplayBox.SelectedIndex = mDisplayBox.SelectedIndex - 2; + mDisplayBox.SelectedIndex = mDisplayBox.Items.Count - 2; } UpdateTimeDisplay(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <avn...@us...> - 2008-01-04 08:32:56
|
Revision: 2801 http://urakawa.svn.sourceforge.net/urakawa/?rev=2801&view=rev Author: avneeshsingh Date: 2008-01-04 00:32:54 -0800 (Fri, 04 Jan 2008) Log Message: ----------- Check for recording added to transport functions for avoiding conflict with Playback Modified Paths: -------------- trunk/urakawa/application/Obi/Obi/ProjectView/TransportBar.cs Modified: trunk/urakawa/application/Obi/Obi/ProjectView/TransportBar.cs =================================================================== --- trunk/urakawa/application/Obi/Obi/ProjectView/TransportBar.cs 2008-01-04 08:07:22 UTC (rev 2800) +++ trunk/urakawa/application/Obi/Obi/ProjectView/TransportBar.cs 2008-01-04 08:32:54 UTC (rev 2801) @@ -355,10 +355,10 @@ /// </summary> public void PrevSection() { - if (!IsInlineRecording) + if ( Enabled && mRecordingSession == null ) { mIsSerialPlaying = true; - if (Enabled) mCurrentPlaylist.NavigateToPreviousSection(); + mCurrentPlaylist.NavigateToPreviousSection(); if (mCurrentPlaylist.State != Obi.Audio.AudioPlayerState.Playing) mIsSerialPlaying = false; } } @@ -368,10 +368,10 @@ /// </summary> public void PrevPhrase() { - if (!IsInlineRecording) + if ( Enabled && mRecordingSession == null ) { if (mCurrentPlaylist.State == Obi.Audio.AudioPlayerState.Playing) mIsSerialPlaying = true; - if (Enabled) mCurrentPlaylist.NavigateToPreviousPhrase(); + mCurrentPlaylist.NavigateToPreviousPhrase(); if (mCurrentPlaylist.State != Obi.Audio.AudioPlayerState.Playing) mIsSerialPlaying = false; } } @@ -381,15 +381,15 @@ /// </summary> public void Rewind() { - if (Enabled) + if (Enabled && mRecordingSession == null) { - if (mCurrentPlaylist.Audioplayer.State == Obi.Audio.AudioPlayerState.Stopped) - Play(); + if (mCurrentPlaylist.Audioplayer.State == Obi.Audio.AudioPlayerState.Stopped) + Play(); - mIsSerialPlaying = true; - mCurrentPlaylist.Rewind(); - } - } + mIsSerialPlaying = true; + mCurrentPlaylist.Rewind(); + } + } /// <summary> /// checks if play selection should be initialised from PlayAll function @@ -672,7 +672,7 @@ /// </summary> public void FastForward() { - if (Enabled && !IsInlineRecording) + if (Enabled && mRecordingSession == null ) { if ( mCurrentPlaylist.Audioplayer.State == Obi.Audio.AudioPlayerState.Stopped ) Play(); @@ -1216,10 +1216,10 @@ public void PreviousPage() { - if ( mRecordingSession == null ) + if ( Enabled && mRecordingSession == null ) { mIsSerialPlaying = true; - if (Enabled) mCurrentPlaylist.NavigateToPreviousPage(); + mCurrentPlaylist.NavigateToPreviousPage(); if (mCurrentPlaylist.State != Obi.Audio.AudioPlayerState.Playing) mIsSerialPlaying = false; } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <avn...@us...> - 2008-01-16 17:13:42
|
Revision: 2826 http://urakawa.svn.sourceforge.net/urakawa/?rev=2826&view=rev Author: avneeshsingh Date: 2008-01-16 09:13:37 -0800 (Wed, 16 Jan 2008) Log Message: ----------- on the fly To do custom node marking added to transport bar Modified Paths: -------------- trunk/urakawa/application/Obi/Obi/ProjectView/TransportBar.cs Modified: trunk/urakawa/application/Obi/Obi/ProjectView/TransportBar.cs =================================================================== --- trunk/urakawa/application/Obi/Obi/ProjectView/TransportBar.cs 2008-01-16 07:18:59 UTC (rev 2825) +++ trunk/urakawa/application/Obi/Obi/ProjectView/TransportBar.cs 2008-01-16 17:13:37 UTC (rev 2826) @@ -1317,6 +1317,25 @@ EmptyNode.Kind.Custom, Localizer.Message("default_custom_class_name"))); } + public void MarkTodoClass() + { + EmptyNode node; + if (IsRecording) + { + node = mRecordingSection.PhraseChild(mRecordingSection.PhraseChildCount - 1); + mView.Presentation.UndoRedoManager.execute(new Commands.Node.ChangeCustomType(mView, node, + EmptyNode.Kind.Custom, Localizer.Message("CustomClass_Todo_Name"))); + NextPhrase(); + } + else + { + node = mView.SelectedNodeAs<EmptyNode>(); + mView.Presentation.UndoRedoManager.execute(new Commands.Node.ChangeCustomType(mView, node, + EmptyNode.Kind.Custom, Localizer.Message("CustomClass_Todo_Name"))); + } + } + + #endregion } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <avn...@us...> - 2008-01-18 11:44:56
|
Revision: 2829 http://urakawa.svn.sourceforge.net/urakawa/?rev=2829&view=rev Author: avneeshsingh Date: 2008-01-18 03:44:54 -0800 (Fri, 18 Jan 2008) Log Message: ----------- Minor error in to do function corrected Modified Paths: -------------- trunk/urakawa/application/Obi/Obi/ProjectView/TransportBar.cs Modified: trunk/urakawa/application/Obi/Obi/ProjectView/TransportBar.cs =================================================================== --- trunk/urakawa/application/Obi/Obi/ProjectView/TransportBar.cs 2008-01-18 11:37:47 UTC (rev 2828) +++ trunk/urakawa/application/Obi/Obi/ProjectView/TransportBar.cs 2008-01-18 11:44:54 UTC (rev 2829) @@ -1320,29 +1320,29 @@ public void MarkTodoClass() { EmptyNode node; - if ( IsPlaying) - Pause(); - + if (IsPlaying) + Pause(); + if (IsRecording) { - node = mRecordingSection.PhraseChild(mRecordingSection.PhraseChildCount - 1); - mView.Presentation.UndoRedoManager.execute(new Commands.Node.ChangeCustomType(mView, node, - EmptyNode.Kind.To_Do )); + node = mRecordingSection.PhraseChild(mRecordingSection.PhraseChildCount - 1); + mView.Presentation.UndoRedoManager.execute(new Commands.Node.ChangeCustomType(mView, node, + EmptyNode.Kind.To_Do)); NextPhrase(); } - else + else { node = mView.SelectedNodeAs<EmptyNode>(); + + if (node != null) + { + mView.Presentation.UndoRedoManager.execute(new Commands.Node.ChangeCustomType(mView, node, + EmptyNode.Kind.To_Do)); + } } - if ( node != null ) - { - mView.Presentation.UndoRedoManager.execute(new Commands.Node.ChangeCustomType(mView, node, - EmptyNode.Kind.To_Do )); - } - } + } - #endregion } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <avn...@us...> - 2008-03-06 11:02:12
|
Revision: 2932 http://urakawa.svn.sourceforge.net/urakawa/?rev=2932&view=rev Author: avneeshsingh Date: 2008-03-06 03:02:02 -0800 (Thu, 06 Mar 2008) Log Message: ----------- Fix to bugg of crashing when playback is started after recording without refreshing selection Modified Paths: -------------- trunk/urakawa/application/Obi/Obi/ProjectView/TransportBar.cs Modified: trunk/urakawa/application/Obi/Obi/ProjectView/TransportBar.cs =================================================================== --- trunk/urakawa/application/Obi/Obi/ProjectView/TransportBar.cs 2008-03-06 07:58:04 UTC (rev 2931) +++ trunk/urakawa/application/Obi/Obi/ProjectView/TransportBar.cs 2008-03-06 11:02:02 UTC (rev 2932) @@ -676,40 +676,43 @@ /// </summary> public void Stop() { - if (mRecordingSession != null && - (mRecordingSession.AudioRecorder.State == Obi.Audio.AudioRecorderState.Listening || mRecordingSession.AudioRecorder.State == Obi.Audio.AudioRecorderState.Recording)) + if (mRecordingSession != null && + (mRecordingSession.AudioRecorder.State == Obi.Audio.AudioRecorderState.Listening || mRecordingSession.AudioRecorder.State == Obi.Audio.AudioRecorderState.Recording)) { StopRecording(); } - if (IsInlineRecording) + else { - inlineRecordingSession.Stop(); - //if(mDidCreateSectionForRecording && inlineRecordingSession.RecordedAudio.Count == 0) - // this.mProjectPanel.ParentObiForm.UndoLast(); + if (IsInlineRecording) + { + inlineRecordingSession.Stop(); + //if(mDidCreateSectionForRecording && inlineRecordingSession.RecordedAudio.Count == 0) + // this.mProjectPanel.ParentObiForm.UndoLast(); - for (int i = 0; i < inlineRecordingSession.RecordedAudio.Count; ++i) - { - // mProjectPanel.StripManager.UpdateAudioForPhrase(mRecordingToSection.PhraseChild(mRecordingStartIndex + i), inlineRecordingSession.RecordedAudio[i]); + for (int i = 0; i < inlineRecordingSession.RecordedAudio.Count; ++i) + { + // mProjectPanel.StripManager.UpdateAudioForPhrase(mRecordingToSection.PhraseChild(mRecordingStartIndex + i), inlineRecordingSession.RecordedAudio[i]); + } + + inlineRecordingSession = null; + UpdateInlineRecordingState(); } - - inlineRecordingSession = null; - UpdateInlineRecordingState(); - } - else if (Enabled) - { - // Stopping again deselects everything - if (mCurrentPlaylist.State == Obi.Audio.AudioPlayerState.Stopped) + else if (Enabled) { - mView.Selection = null; + // Stopping again deselects everything + if (mCurrentPlaylist.State == Obi.Audio.AudioPlayerState.Stopped) + { + mView.Selection = null; + } + else + { + mCurrentPlaylist.Stop(); + mView.Selection = mPlayingFrom; + } + mPlayingFrom = null; + mIsSerialPlaying = false; } - else - { - mCurrentPlaylist.Stop(); - mView.Selection = mPlayingFrom; - } - mPlayingFrom = null; - mIsSerialPlaying = false; - } + }// end recording if } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <avn...@us...> - 2008-03-17 10:15:09
|
Revision: 2955 http://urakawa.svn.sourceforge.net/urakawa/?rev=2955&view=rev Author: avneeshsingh Date: 2008-03-17 03:15:07 -0700 (Mon, 17 Mar 2008) Log Message: ----------- Improvement to workaround used for selecting in phrase audio in absense of support in waveform support for externally marking audio selection Modified Paths: -------------- trunk/urakawa/application/Obi/Obi/ProjectView/TransportBar.cs Modified: trunk/urakawa/application/Obi/Obi/ProjectView/TransportBar.cs =================================================================== --- trunk/urakawa/application/Obi/Obi/ProjectView/TransportBar.cs 2008-03-17 10:04:36 UTC (rev 2954) +++ trunk/urakawa/application/Obi/Obi/ProjectView/TransportBar.cs 2008-03-17 10:15:07 UTC (rev 2955) @@ -96,9 +96,13 @@ mIsSerialPlaying = false ; } } - - } + m_IsSelectionMarked = false; + } + //Avn: a temprorary flag introduced as a work around till support for setting waveform selection externally is added + // flag is turned true when selection end is marked and is turned false whenever selection changes + private bool m_IsSelectionMarked = false; + public void NewPresentation() { mPlayingFrom = null; @@ -513,7 +517,7 @@ /// </summary> public void Play(ObiNode node) { - // Avn: For instantly playing LocalPlaylist check if current playlist is MasterPlaylist + // Avn: For instantly playing LocalPlaylist check if current playlist is MasterPlaylist // and if this MasterPlaylist is not in stopped state, stop it. if (mCurrentPlaylist.State != Obi.Audio.AudioPlayerState.Stopped && mCurrentPlaylist == mMasterPlaylist) @@ -531,9 +535,9 @@ mCurrentPlaylist.CurrentPhrase = mLocalPlaylist.FirstPhrase; // Avn: condition added on 13 may 2007 if (mCurrentPlaylist.PhraseList.Count > 1) mIsSerialPlaying = true; - + if (mView.Selection is AudioSelection - && ((AudioSelection)mView.Selection).AudioRange.HasCursor + && ( !((AudioSelection)mView.Selection).AudioRange.HasCursor || m_IsSelectionMarked ) && ((AudioSelection)mView.Selection).AudioRange.SelectionEndTime > ((AudioSelection)mView.Selection).AudioRange.SelectionBeginTime) mCurrentPlaylist.PreviewSelectedFragment(((AudioSelection)mView.Selection).AudioRange.SelectionBeginTime, ((AudioSelection)mView.Selection).AudioRange.SelectionEndTime); else if (mView.Selection is AudioSelection @@ -949,8 +953,8 @@ get { return mView.Selection != null - && mView.Selection is AudioSelection - && ((AudioSelection)mView.Selection).AudioRange.HasCursor; + && mView.Selection is AudioSelection; + //&& !((AudioSelection)mView.Selection).AudioRange.HasCursor; } } @@ -970,7 +974,8 @@ && mCurrentPlaylist.CurrentTimeInAsset > ((AudioSelection)mView.Selection).AudioRange.SelectionBeginTime ) { ((AudioSelection)mView.Selection).AudioRange.SelectionEndTime = ((AudioSelection)mView.Selection).AudioRange.CursorTime ; - return true; + m_IsSelectionMarked = true; + return true; } return false; } @@ -988,8 +993,8 @@ public bool PlayPreviewSelectedFragment() { - if ( IsInPhraseSelectionMarked - && ((AudioSelection)mView.Selection).AudioRange.SelectionBeginTime < ((AudioSelection)mView.Selection).AudioRange.SelectionEndTime ) + if ( IsInPhraseSelectionMarked + && ((AudioSelection)mView.Selection).AudioRange.SelectionBeginTime < ((AudioSelection)mView.Selection).AudioRange.SelectionEndTime ) { mCurrentPlaylist.PreviewSelectedFragment(((AudioSelection)mView.Selection).AudioRange.SelectionBeginTime, ((AudioSelection)mView.Selection).AudioRange.SelectionEndTime ); return true; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <avn...@us...> - 2008-03-19 17:51:50
|
Revision: 2960 http://urakawa.svn.sourceforge.net/urakawa/?rev=2960&view=rev Author: avneeshsingh Date: 2008-03-19 10:51:45 -0700 (Wed, 19 Mar 2008) Log Message: ----------- playback behaviour roleback started. Modified Paths: -------------- trunk/urakawa/application/Obi/Obi/ProjectView/TransportBar.cs Modified: trunk/urakawa/application/Obi/Obi/ProjectView/TransportBar.cs =================================================================== --- trunk/urakawa/application/Obi/Obi/ProjectView/TransportBar.cs 2008-03-18 18:29:29 UTC (rev 2959) +++ trunk/urakawa/application/Obi/Obi/ProjectView/TransportBar.cs 2008-03-19 17:51:45 UTC (rev 2960) @@ -389,7 +389,7 @@ private void mPrevSectionButton_Click(object sender, EventArgs e) { PrevSection(); } private void mPrevPhraseButton_Click(object sender, EventArgs e) { PrevPhrase(); } private void mRewindButton_Click(object sender, EventArgs e) { Rewind(); } - private void mPlayButton_Click(object sender, EventArgs e) { Play(); } + private void mPlayButton_Click(object sender, EventArgs e) { Play(mView.Selection.Node); } private void mPauseButton_Click(object sender, EventArgs e) { Pause(); } private void mRecordButton_Click(object sender, EventArgs e) { Record(); } private void mStopButton_Click(object sender, EventArgs e) { Stop(); } @@ -470,14 +470,14 @@ if (mCurrentPlaylist.State != Obi.Audio.AudioPlayerState.Stopped && mCurrentPlaylist == mLocalPlaylist) StopInternal(); if (CanPlay) { - if (IsPlaySelection) - { - Play(mView.Selection.Node); - } - else - { + //if (IsPlaySelection) + //{ + //Play(mView.Selection.Node); + //} + //else + //{ PlayMasterPlaylist(); - } + //} } else if (CanResumePlayback) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <avn...@us...> - 2008-03-20 09:51:29
|
Revision: 2963 http://urakawa.svn.sourceforge.net/urakawa/?rev=2963&view=rev Author: avneeshsingh Date: 2008-03-20 02:51:26 -0700 (Thu, 20 Mar 2008) Log Message: ----------- Minor update for playback behaviour roleback Modified Paths: -------------- trunk/urakawa/application/Obi/Obi/ProjectView/TransportBar.cs Modified: trunk/urakawa/application/Obi/Obi/ProjectView/TransportBar.cs =================================================================== --- trunk/urakawa/application/Obi/Obi/ProjectView/TransportBar.cs 2008-03-19 22:55:56 UTC (rev 2962) +++ trunk/urakawa/application/Obi/Obi/ProjectView/TransportBar.cs 2008-03-20 09:51:26 UTC (rev 2963) @@ -532,7 +532,7 @@ mPlayingFrom = mView.Selection; LocalPlaylist = new Playlist(mPlayer, mView.Selection); mCurrentPlaylist = mLocalPlaylist; - mCurrentPlaylist.CurrentPhrase = mLocalPlaylist.FirstPhrase; + mCurrentPlaylist.CurrentPhrase = InitialPhrase; // Avn: condition added on 13 may 2007 if (mCurrentPlaylist.PhraseList.Count > 1) mIsSerialPlaying = true; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <avn...@us...> - 2008-03-21 06:09:31
|
Revision: 2966 http://urakawa.svn.sourceforge.net/urakawa/?rev=2966&view=rev Author: avneeshsingh Date: 2008-03-20 23:09:28 -0700 (Thu, 20 Mar 2008) Log Message: ----------- Fix to bugg: Play button triggeres crash when nothing is selected Modified Paths: -------------- trunk/urakawa/application/Obi/Obi/ProjectView/TransportBar.cs Modified: trunk/urakawa/application/Obi/Obi/ProjectView/TransportBar.cs =================================================================== --- trunk/urakawa/application/Obi/Obi/ProjectView/TransportBar.cs 2008-03-20 18:45:17 UTC (rev 2965) +++ trunk/urakawa/application/Obi/Obi/ProjectView/TransportBar.cs 2008-03-21 06:09:28 UTC (rev 2966) @@ -389,7 +389,7 @@ private void mPrevSectionButton_Click(object sender, EventArgs e) { PrevSection(); } private void mPrevPhraseButton_Click(object sender, EventArgs e) { PrevPhrase(); } private void mRewindButton_Click(object sender, EventArgs e) { Rewind(); } - private void mPlayButton_Click(object sender, EventArgs e) { Play(mView.Selection.Node); } + private void mPlayButton_Click(object sender, EventArgs e) { if ( mView.CanPlaySelection ) Play(mView.Selection.Node); } private void mPauseButton_Click(object sender, EventArgs e) { Pause(); } private void mRecordButton_Click(object sender, EventArgs e) { Record(); } private void mStopButton_Click(object sender, EventArgs e) { Stop(); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <avn...@us...> - 2008-03-21 15:09:51
|
Revision: 2969 http://urakawa.svn.sourceforge.net/urakawa/?rev=2969&view=rev Author: avneeshsingh Date: 2008-03-21 08:09:49 -0700 (Fri, 21 Mar 2008) Log Message: ----------- Play button plays all if selection is null. Modified Paths: -------------- trunk/urakawa/application/Obi/Obi/ProjectView/TransportBar.cs Modified: trunk/urakawa/application/Obi/Obi/ProjectView/TransportBar.cs =================================================================== --- trunk/urakawa/application/Obi/Obi/ProjectView/TransportBar.cs 2008-03-21 13:10:15 UTC (rev 2968) +++ trunk/urakawa/application/Obi/Obi/ProjectView/TransportBar.cs 2008-03-21 15:09:49 UTC (rev 2969) @@ -389,8 +389,12 @@ private void mPrevSectionButton_Click(object sender, EventArgs e) { PrevSection(); } private void mPrevPhraseButton_Click(object sender, EventArgs e) { PrevPhrase(); } private void mRewindButton_Click(object sender, EventArgs e) { Rewind(); } - private void mPlayButton_Click(object sender, EventArgs e) { if ( mView.CanPlaySelection ) Play(mView.Selection.Node); } - private void mPauseButton_Click(object sender, EventArgs e) { Pause(); } + private void mPlayButton_Click(object sender, EventArgs e) + { + if (mView.CanPlaySelection) Play(mView.Selection.Node); + else Play(); + } + private void mPauseButton_Click(object sender, EventArgs e) { Pause(); } private void mRecordButton_Click(object sender, EventArgs e) { Record(); } private void mStopButton_Click(object sender, EventArgs e) { Stop(); } private void mFastForwardButton_Click(object sender, EventArgs e) { FastForward(); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <avn...@us...> - 2008-03-24 19:12:40
|
Revision: 2979 http://urakawa.svn.sourceforge.net/urakawa/?rev=2979&view=rev Author: avneeshsingh Date: 2008-03-24 12:12:37 -0700 (Mon, 24 Mar 2008) Log Message: ----------- Fix to bugg: Playback block is dropped when home / end is pressed while in playing state. Will like to verify this fix more. Modified Paths: -------------- trunk/urakawa/application/Obi/Obi/ProjectView/TransportBar.cs Modified: trunk/urakawa/application/Obi/Obi/ProjectView/TransportBar.cs =================================================================== --- trunk/urakawa/application/Obi/Obi/ProjectView/TransportBar.cs 2008-03-24 14:44:43 UTC (rev 2978) +++ trunk/urakawa/application/Obi/Obi/ProjectView/TransportBar.cs 2008-03-24 19:12:37 UTC (rev 2979) @@ -96,6 +96,15 @@ mIsSerialPlaying = false; } } + + // playback block updated in case it drops on selection change. This is for now, will be changed with new implementation of selection + if ( mView.Selection != null + && mView.Selection.Node is PhraseNode && !(mView.Selection is AudioSelection) + && mPlayer.State == Obi.Audio.AudioPlayerState.Playing) + { + mView.PlaybackBlock = (PhraseNode)mView.Selection.Node; + } + m_IsSelectionMarked = false; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ju...@us...> - 2008-03-26 17:28:28
|
Revision: 2983 http://urakawa.svn.sourceforge.net/urakawa/?rev=2983&view=rev Author: julienq Date: 2008-03-26 10:28:24 -0700 (Wed, 26 Mar 2008) Log Message: ----------- Removed obsolete inlineRecording flag from transport bar. Modified Paths: -------------- trunk/urakawa/application/Obi/Obi/ProjectView/TransportBar.cs Modified: trunk/urakawa/application/Obi/Obi/ProjectView/TransportBar.cs =================================================================== --- trunk/urakawa/application/Obi/Obi/ProjectView/TransportBar.cs 2008-03-26 17:16:56 UTC (rev 2982) +++ trunk/urakawa/application/Obi/Obi/ProjectView/TransportBar.cs 2008-03-26 17:28:24 UTC (rev 2983) @@ -58,9 +58,6 @@ private bool m_AllowOverwriteRecording = true ; - RecordingSession inlineRecordingSession = null; // LNN: hack for doing non-dialog recording. - public bool IsInlineRecording - { get { return (inlineRecordingSession != null); } } // constants from the display combo box @@ -177,7 +174,6 @@ { return Enabled && mCurrentPlaylist.State == Audio.AudioPlayerState.Stopped - && !IsInlineRecording && !IsRecorderActive; } } @@ -201,8 +197,6 @@ { return Enabled && mCurrentPlaylist.State == Audio.AudioPlayerState.Paused - && !IsInlineRecording - && !IsRecorderActive; } } @@ -691,27 +685,14 @@ public void UpdateInlineRecordingState() { - if (IsInlineRecording) - { - mPrevPhraseButton.Enabled = false; - mPrevSectionButton.Enabled = false; - mRewindButton.Enabled = false; - mPlayButton.Enabled = false; - mFastForwardButton.Enabled = false; - mNextSectionButton.Enabled = false; - mPauseButton.Enabled = false; - } - else - { - mPrevPhraseButton.Enabled = this.Enabled; - mPrevSectionButton.Enabled = this.Enabled; - mRewindButton.Enabled = this.Enabled; - mFastForwardButton.Enabled = this.Enabled; - mPlayButton.Enabled = CanPlay; - mNextPhrase.Enabled = this.Enabled; - mNextSectionButton.Enabled = this.Enabled; - mPauseButton.Enabled = this.Enabled; - } + mPrevPhraseButton.Enabled = this.Enabled; + mPrevSectionButton.Enabled = this.Enabled; + mRewindButton.Enabled = this.Enabled; + mFastForwardButton.Enabled = this.Enabled; + mPlayButton.Enabled = CanPlay; + mNextPhrase.Enabled = this.Enabled; + mNextSectionButton.Enabled = this.Enabled; + mPauseButton.Enabled = this.Enabled; } @@ -728,22 +709,8 @@ } else { - if (IsInlineRecording) + if (Enabled) { - inlineRecordingSession.Stop(); - //if(mDidCreateSectionForRecording && inlineRecordingSession.RecordedAudio.Count == 0) - // this.mProjectPanel.ParentObiForm.UndoLast(); - - for (int i = 0; i < inlineRecordingSession.RecordedAudio.Count; ++i) - { - // mProjectPanel.StripManager.UpdateAudioForPhrase(mRecordingToSection.PhraseChild(mRecordingStartIndex + i), inlineRecordingSession.RecordedAudio[i]); - } - - inlineRecordingSession = null; - UpdateInlineRecordingState(); - } - else if (Enabled) - { // Stopping again deselects everything if (mCurrentPlaylist.State == Obi.Audio.AudioPlayerState.Stopped) { @@ -757,7 +724,7 @@ mPlayingFrom = null; mIsSerialPlaying = false; } - }// end recording if + } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <avn...@us...> - 2008-03-28 13:19:02
|
Revision: 2990 http://urakawa.svn.sourceforge.net/urakawa/?rev=2990&view=rev Author: avneeshsingh Date: 2008-03-28 06:18:58 -0700 (Fri, 28 Mar 2008) Log Message: ----------- fix to bugg: Exception thrown on using phrase mark button when selection is null Modified Paths: -------------- trunk/urakawa/application/Obi/Obi/ProjectView/TransportBar.cs Modified: trunk/urakawa/application/Obi/Obi/ProjectView/TransportBar.cs =================================================================== --- trunk/urakawa/application/Obi/Obi/ProjectView/TransportBar.cs 2008-03-28 06:59:53 UTC (rev 2989) +++ trunk/urakawa/application/Obi/Obi/ProjectView/TransportBar.cs 2008-03-28 13:18:58 UTC (rev 2990) @@ -1303,18 +1303,21 @@ /// </summary> public void MarkCustomClass() { - EmptyNode node; - if (IsRecording) + if (mView.Selection != null) { - NextPhrase(); - node = mRecordingSection.PhraseChild(mRecordingSection.PhraseChildCount - 1); + EmptyNode node; + if (IsRecording) + { + NextPhrase(); + node = mRecordingSection.PhraseChild(mRecordingSection.PhraseChildCount - 1); + } + else + { + node = mView.SelectedNodeAs<EmptyNode>(); + } + mView.Presentation.getUndoRedoManager().execute(new Commands.Node.ChangeCustomType(mView, node, + EmptyNode.Kind.Custom, Localizer.Message("default_custom_class_name"))); } - else - { - node = mView.SelectedNodeAs<EmptyNode>(); - } - mView.Presentation.getUndoRedoManager().execute(new Commands.Node.ChangeCustomType(mView, node, - EmptyNode.Kind.Custom, Localizer.Message("default_custom_class_name"))); } public void MarkTodoClass() This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |