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. |