public void StopRecording() { // Stop the microphone NatMic.StopRecording(); // Stop recording cameraRecorder.Dispose(); NatCorder.StopRecording(); }
void StopRecording() { Debug.Log("stop recording method"); //Destroy the camera recorder videoRecorder.Dispose(); // audioRecorder.Dispose(); // Stop recording NatCorder.StopRecording(); }
} //END CallStartRecordingBlockEventExternalCamera //-------------------------------// private void OnRecordingComplete( string path ) //-------------------------------// { //If our PersistentDataPath/VideoRecordings path does not exist, create it now if( !Directory.Exists( DatabaseStringHelper.CreatePersistentDataPath("VideoRecordings") ) ) { Directory.CreateDirectory( DatabaseStringHelper.CreatePersistentDataPath("VideoRecordings") ); } //Move the recording into the PersistentData folder under the 'VideoRecordings' subfolder if ( File.Exists( path ) ) { FileInfo fileInfo = new FileInfo( path ); if( fileInfo != null ) { File.Move( path, DatabaseStringHelper.CreatePersistentDataPath("VideoRecordings/" + fileInfo.Name ) ); path = DatabaseStringHelper.CreatePersistentDataPath("VideoRecordings/" + fileInfo.Name ); } } if( showDebug ) { Debug.Log( "BlockEventRecorder.cs OnRecordingComplete() adding path to list of captured videos = " + path ); } //Add our path to our list of recorded videos if( recordedVideos == null ) { recordedVideos = new List<string>(); } recordedVideos.Add( path ); #if NATCORDER //If we were capturing images from a passed in camera, dispose of the cameraRecorder at this time to free up memory if( cameraRecorder != null ) { cameraRecorder.Dispose(); cameraRecorder = null; } #endif //If we were capturing audio samples from an AudioListener or AudioSource, destroy the AudioGetter.cs helper script attached to it if( audioGetter != null ) { Destroy( audioGetter ); audioGetter = null; } #if NATCORDER //If we were capturing audio from the app, dispose of the audioRecorder at this time if( audioRecorder != null ) { audioRecorder.Dispose(); audioRecorder = null; } #endif if( onRecordingCompleted != null ) { onRecordingCompleted.Invoke( path ); } } //END OnRecordingComplete
public void StopRecording() { // Stop the microphone if we used it for recording if (recordMicrophone) { Microphone.End(null); microphoneSource.Stop(); audioRecorder.Dispose(); } // Stop the recording videoRecorder.Dispose(); NatCorder.StopRecording(); }