/// <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); }
// 处理音频:传入处理类和要处理的音频序号 public void AudioProcess(IAudioProcessor audioProcessor, int processIndex) { if (audioProcessor.AudioProcess(audioClips[processIndex])) { Debug.Log("处理成功!"); } else { Debug.Log("处理失败"); } }
public void RegisterPlugin(IAudioProcessor PlugIn) { if (PlugIn == null) { return; } if (ProcessorQueue == null) { ProcessorQueue = new List <IAudioProcessor>(); } ProcessorQueue.Add(PlugIn); }
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(); }
public void ActivateAudio(IAudioProcessor audioProcessor) { AudioProcessor = audioProcessor; AudioProcessor.Init((int)Game.SystemAVInfo.timing.sample_rate); }
public void DeactivateAudio() { AudioProcessor?.DeInit(); AudioProcessor = null; }
public StandardAudioPlayer(IAudioProcessor processor) { this.processor = processor; }
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); }
public void RegisterPlugin(IAudioProcessor PlugIn) { if (PlugIn == null) return; if (ProcessorQueue == null) ProcessorQueue = new List<IAudioProcessor>(); ProcessorQueue.Add(PlugIn); }
public void RegisterPlugin(IAudioProcessor PlugIn) { throw new NotSupportedException(); }
// 处理音频:传入处理类和要处理的音频 public void AudioProcess(IAudioProcessor audioProcessor, AudioClip audioClip) { Debug.Log("WindyIce"); audioProcessor.AudioProcess(audioClip); }
/// /// \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 ); }