Exemple #1
0
 public AudioDataChangedEvent AudioDataChanged; // Audio data change
 protected virtual void AudioDataChange(AudioDataChangeEventArgs e)
 {
     if (AudioDataChanged != null)
     {
         AudioDataChanged(this, e);
     }
 }
Exemple #2
0
 // 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);
     }
 }
 // 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);
     }
 }