Symptom
The OpenSL ES audio recording API fails to be called. Consequently, the program breaks down. The error log information is as follows:
08-06 00:39:20.042 5198-5219/? E C02b00/AudioFramework: [audio_service_client.cpp] Client doesn't have MICROPHONE permission
Solution
You must apply for the ohos.permission.MICROPHONE permission. For details, please refer to Open user_grant Permissions.