/// <summary>
        /// Add a plug-in to the audio buffer's plug-in list
        /// </summary>
        public void RegisterPlugin(IAudioProcessor PlugIn)
        {
            if (AudioBuffers == null)
            {
                throw new Exception("Can't register a plug-in: audio buffer has not been configured");
            }

            AudioBuffers.RegisterPlugin(PlugIn);
        }
Пример #2
0
 // 处理音频:传入处理类和要处理的音频序号
 public void AudioProcess(IAudioProcessor audioProcessor, int processIndex)
 {
     if (audioProcessor.AudioProcess(audioClips[processIndex]))
     {
         Debug.Log("处理成功!");
     }
     else
     {
         Debug.Log("处理失败");
     }
 }
Пример #3
0
        public void RegisterPlugin(IAudioProcessor PlugIn)
        {
            if (PlugIn == null)
            {
                return;
            }
            if (ProcessorQueue == null)
            {
                ProcessorQueue = new List <IAudioProcessor>();
            }

            ProcessorQueue.Add(PlugIn);
        }
Пример #4
0
        private void StartAudio()
        {
            if (processor != null)
            {
                processor.Cleanup();
            }
            processor = new FFTProcessorViewModel(FFTOptions);
            OnPropertyChanged(nameof(FFTViewModel));

            if (reader == null)
            {
                reader = new AudioReaderViewModel();
            }

            reader.Setup(GetReaderModel());
            (reader as AudioReaderViewModel).WaveIn.BufferMilliseconds = 250;
            (reader as AudioReaderViewModel).WaveIn.DataAvailable     += WaveIn_DataAvailable;
            reader.Start();
        }
        public SkypeAudioInterceptor(ISkype skype, _ISkypeEvents_Event skypeEvents, ILog log, IAudioProcessor audioProcessor)
        {
            this.log            = log;
            this.audioProcessor = audioProcessor;

            this.timer     = new Timer();
            timer.Interval = 500; // TimeSpan.FromMilliseconds(500);
            timer.Tick    += TimerOnTick;
            InitSockets();

            this.skype = skype;
            if (!skype.Client.IsRunning)
            {
                log.Error("Skype is not running - check you have installed and started the desktop version of Skype");
            }

            skypeEvents.AttachmentStatus += OnSkypeAttachmentStatus;
            skypeEvents.CallStatus       += OnSkypeCallStatus;
            skypeEvents.Error            += OnSkypeError;
            timer.Start();
        }
Пример #6
0
 public void ActivateAudio(IAudioProcessor audioProcessor)
 {
     AudioProcessor = audioProcessor;
     AudioProcessor.Init((int)Game.SystemAVInfo.timing.sample_rate);
 }
Пример #7
0
 public void DeactivateAudio()
 {
     AudioProcessor?.DeInit();
     AudioProcessor = null;
 }
Пример #8
0
 public StandardAudioPlayer(IAudioProcessor processor)
 {
     this.processor = processor;
 }
Пример #9
0
 public void Dispose()
 {
     AudioEngine.Log($"AudioSampleBuffer({GetHashCode()}): Disposed ");
     Processor = null;
 }
        /// <summary>
        /// Add a plug-in to the audio buffer's plug-in list
        /// </summary>
        public void RegisterPlugin(IAudioProcessor PlugIn)
        {
            if (AudioBuffers == null) throw new Exception("Can't register a plug-in: audio buffer has not been configured");

            AudioBuffers.RegisterPlugin(PlugIn);
        }
Пример #11
0
        public void RegisterPlugin(IAudioProcessor PlugIn)
        {
            if (PlugIn == null) return;
            if (ProcessorQueue == null) ProcessorQueue = new List<IAudioProcessor>();

            ProcessorQueue.Add(PlugIn);
        }
Пример #12
0
 public void RegisterPlugin(IAudioProcessor PlugIn)
 {
     throw new NotSupportedException();
 }
Пример #13
0
 // 处理音频:传入处理类和要处理的音频
 public void AudioProcess(IAudioProcessor audioProcessor, AudioClip audioClip)
 {
     Debug.Log("WindyIce");
     audioProcessor.AudioProcess(audioClip);
 }
Пример #14
0
        ///
        /// \warning When creating an object for remoting, call Init() and
        ///   access the singleton returned by theBackend. This constructor
        ///   is public only for use by non-remoting configurations.
        /// 
        public Backend( int desiredQueueSize, 
                      string connectionString,
                      Quality qualityLevel,
                      Backend.CompressionType compressionType,
                      string metadataFileName )
        {
            _Trace( "[Backend]" );

             _qualityLevel = qualityLevel;
             _compressionType = compressionType;
             _desiredQueueSize = desiredQueueSize;
             _connectionString = connectionString;

             if (null == _connectionString)
            throw new ApplicationException( "Engine is not properly initialized by the server" );

             _database = new StatusDatabase( _connectionString );

             _metadataSender = new MetadataSender( metadataFileName );

             // Todo: initialize compressor from stored settings in database
             _compressor = _LoadCompressor();

             // Get defaults from this kind of thing?
             // string bufferSize =
             //    ConfigurationSettings.AppSettings ["BufferSize"];

             // Set up default buffering for the audio engine
             _player = new Player();
             _player.bufferSize = 44100 / 8 ;
             _player.buffersInQueue = 40;
             _player.buffersToPreload = 20;

             // Set up callbacks
             _player.OnTrackFinished +=
            new TrackFinishedHandler( _TrackFinishedCallback );

             _player.OnTrackPlayed +=
            new TrackStartingHandler( _TrackStartingCallback );

             _player.OnReadBuffer +=
            new ReadBufferHandler( _TrackReadCallback );
        }