OnAudioFilterRead on Android

hello, I’m having problems when implementing onaudiofilterread on android, when I run it on PC it works correctly, but on android the extracted sound is heard with different tone, as if changing the pitch.
pulsar y soltar are function calls when you press and release a button.

Attached code example.

	private bool recording = false;
	private  float []dataAux; 
	private int counter =0;
	private int max=220500;

void Start () {

		dataAux = new float[max];
        
        AudioConfiguration audioConfig = AudioSettings.GetConfiguration();
        audioConfig.sampleRate = 44100;
        audioConfig.speakerMode = AudioSpeakerMode.Mono;        
        AudioSettings.Reset(audioConfig);
    }

	void OnAudioFilterRead(float [] data, int channels)
	{
        
		if (recording) {
			for(int i=0; i<data.Length && counter<max;i++, counter++){
				dataAux [counter] = data *;*
  •  	}*
    
  •  }*
    
  • }*

  • public void pulsar()*

  • {*

  •   recording = true;*
    
  • }*
    public void soltar()

  • {*

  •  recording = false;*
    

modulado.clip.SetData (dataAux, 0);

  •  counter = 0;*
    
  • }*

does your android device support sampleRate 44100?

I was doing some research about OnAudioFilterRead and streaming audio. I spent few weeks and noticed that some of devices only support limited options of sample rate.

btw, there is a plugin you might be curious.
FM Exhibition Tool Pack | Forum

You can stream game view / webcam / audio between multiple platforms in local network.
All written in C# and easy to modify.

Supported Platform: iOS/Android/Mac/PC