Exemple #1
0
        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);
        }
Exemple #2
0
        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);
        }
Exemple #3
0
 public void EndRecording()
 {
     if (m_encoder != null)
     {
         m_encoder.Release();
         m_encoder = null;
     }
     m_recording = false;
     Debug.Log("AudioMRecorder: EndRecording()");
 }
Exemple #4
0
        public override void EndRecording()
        {
            if (m_encoder != null)
            {
                m_encoder.Release();
                m_encoder = null;
            }

            if (m_recording)
            {
                Debug.Log("AudioMRecorder: EndRecording()");
            }
            base.EndRecording();
        }
Exemple #5
0
        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()");
            }
        }