I'm still pretty new to programming in Delphi and I don't know anything about Java. However, I need to write a program using RAD Studio that can read the amplitude of the audio input. I could not find a way to do this in Delphi (which I could afford), but I found a way to use the Android API. The solution is similar to a MediaRecorder object, so I tried using it with this code.
var
Form1: TForm1;
RecorderObj: Jobject;
Recorder: JMediaRecorder;
procedure TForm1.FormCreate(Sender: TObject);
begin
Recorder:= MediaRecorder;
Recorder.setAudioSource(1);
end;
procedure TForm1.Timer1Timer(Sender: TObject);
begin
Label1.Text:= IntToStr(Recorder.getMaxAmplitude);
end;
, , . : = MediaRecorder() ( ), Recorder: = MediaRecorder.Create ( , Delphi ) - , Delphi/RAD Studio, , .