public override bool BeginRecording() { if (m_recording) { return(false); } m_outputDir.CreateDirectory(); // initialize encoder { string outPath = m_outputDir.GetFullPath() + "/" + DateTime.Now.ToString("yyyyMMdd_HHmmss"); m_encoderConfigs.Setup(); m_encoder = AudioEncoder.Create(m_encoderConfigs, outPath); if (m_encoder == null || !m_encoder.IsValid()) { EndRecording(); return(false); } } base.BeginRecording(); Debug.Log("AudioMRecorder: BeginRecording()"); return(true); }
public override bool BeginRecording() { if (m_recording) { return(false); } m_outputDir.CreateDirectory(); // initialize encoder { string outPath = m_outputDir.GetFullPath() + "/" + DateTime.Now.ToString("yyyyMMdd_HHmmss"); m_encoderConfigs.Setup(); m_encoder = AudioEncoder.Create(m_encoderConfigs, outPath); if (m_encoder == null) { EndRecording(); return(false); } } m_initialTime = Time.unscaledTime; m_recordedFrames = 0; m_recordedSamples = 0; m_recording = true; Debug.Log("AudioMRecorder: BeginRecording()"); return(true); }
public void EndRecording() { if (m_encoder != null) { m_encoder.Release(); m_encoder = null; } m_recording = false; Debug.Log("AudioMRecorder: EndRecording()"); }
public override void EndRecording() { if (m_encoder != null) { m_encoder.Release(); m_encoder = null; } if (m_recording) { Debug.Log("AudioMRecorder: EndRecording()"); } base.EndRecording(); }
public override void EndRecording() { if (m_encoder != null) { m_encoder.Release(); m_encoder = null; } if (m_recording) { m_recording = false; m_aborted = true; Debug.Log("AudioMRecorder: EndRecording()"); } }