예제 #1
0
파일: GameApp.cs 프로젝트: dydlegd/DT
        public void EndRecording()
        {
            int       length = 0;
            AudioClip clip   = null;

            if (SoundRecordCenter.EndRecording(out length, out clip))
            {
                byte[] dataBuf  = SoundRecordCenter.GetData(clip);
                byte[] dataBuf2 = SoundRecordCenter.GetClipData(clip);
                Debuger.Log("录间数据长度:" + dataBuf.Length);
                Debuger.Log("录间数据长度2:" + dataBuf2.Length);
                byte[] pressBuf = DataZipCenter.CompressByGZIP(dataBuf);
                Debuger.Log("压缩后数据长度:" + pressBuf.Length);
                byte[] pressBuf2 = DataZipCenter.CompressByGZIP(dataBuf2);
                Debuger.Log("压缩后数据长度2:" + pressBuf2.Length);

                clip = SoundRecordCenter.SetData(clip, DataZipCenter.DeCompressByGZIP(pressBuf));

                AudioManager.Play(clip, false);
            }
        }
예제 #2
0
파일: GameApp.cs 프로젝트: dydlegd/DT
 public void StartRecording()
 {
     SoundRecordCenter.TryStartRecording();
 }