public AudioDataChangedEvent AudioDataChanged; // Audio data change protected virtual void AudioDataChange(AudioDataChangeEventArgs e) { if (AudioDataChanged != null) { AudioDataChanged(this, e); } }
// Method to call when the audioThread starts executing private void AudioReadingThread() { while (this.reading) { int readCount = this.audioStream.Read(audioBuffer, 0, audioBuffer.Length); // Dispatch the AudioDataChange event AudioDataChangeEventArgs a = new AudioDataChangeEventArgs(this.audioBuffer, readCount, this.beamRotation, this.sourceRotation); AudioDataChange(a); } }
protected virtual void AudioDataChange(AudioDataChangeEventArgs e) { if (AudioDataChanged != null) { AudioDataChanged(this, e); } }