Exemplo n.º 1
0
        } //END StartRecordingAudio

        //-----------------------------------------------//
        public void StopRecordingAudio()
        //-----------------------------------------------//
        {

            blockEventRecorder = null;

        } //END StopRecordingAudio
Exemplo n.º 2
0
        //------------------------------------------------------//
        /// <summary>
        /// Sends audio samples to the BlockEventRecorder every OnAudioFilterRead() method
        /// </summary>
        /// <param name="recorder">The BlockEventRecorder that should recieve the audio samples</param>
        public void StartRecordingAudio( BlockEventRecorder recorder )
        //------------------------------------------------------//
        {

            //Remove any previous links to BlockEventRecorder's
            blockEventRecorder = null;

            //Store the BlockEventRecorder, when OnAudioFilterRead() is called, we will pass in our audio data to this BlockEventRecorder
            if( recorder != null )
            {
                blockEventRecorder = recorder;
            }

            /*
            if( this.gameObject.GetComponent<AudioListener>() != null )
            {
                Debug.Log( "AudioGetter.cs StartRecordingAudio() found AudioListener component on this gameObject.name = " + name );
            }
            else
            {
                Debug.Log( "AudioGetter.cs StartRecordingAudio() could not find AudioListener component on this gameObject.name = " + name );
            }
            */

        } //END StartRecordingAudio