Jump to content
OldyCoder

Audio recording rises access violation on IOS 13.5.1

Recommended Posts

I'm using following code snippet to record audio on IOS 13.5.1 and getting access violation exception.

My Delphi version is 10.3 Update 3.

It works fine on Android.

 

  Mic := TCaptureDeviceManager.Current.DefaultAudioCaptureDevice;

  if (Mic <> nil) then   begin
    Mic.FileName := 'record.mp3';
    try
      Mic.StartCapture;
    except
      on E: Exception do
        lblError.Text:=E.message;
    end;
  end;

Is there any workaround?

 

Share this post


Link to post

Is there a value for NSMicrophoneUsageDescription in the Project Options, like this?

 

image.thumb.png.7e1abcf4860871627cb3f8bb9c7d4239.png

 

If not, you'll need to add it, by right-clicking on the grid, click Add Key, enter NSMicrophoneUsageDescription as the name, click OK, then provide a value for it.

  • Like 2

Share this post


Link to post

Thank you Dave.

The problem was caused by audio format that I used.

IOS does not support mp3 audio format. IOS supports only caf format.

 

Yes my new problem is:

How can I convert caf to mp3 on IOS 😊

Share this post


Link to post
On 7/30/2020 at 9:00 AM, OldyCoder said:

Thank you Dave.

The problem was caused by audio format that I used.

IOS does not support mp3 audio format. IOS supports only caf format.

 

Yes my new problem is:

How can I convert caf to mp3 on IOS 😊

Hello

Have you resolve this problem of convertion?

I have same problem 😅

Thanks

 

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×