Can't start microphone recording

Create issue
Issue #187 closed
Igor Gvaldov created an issue

RecordingDevice:start() always returns false (Microphone permission granted).

Phone: Mi A1

Firmware: LOS 16.0 (Android 9)

Love2D version: 11.3 (APK file downloaded from the main repo)

What am I doing wrong?

--------- beginning of main
--------- beginning of system
12-04 06:07:52.963 17114 17138 D openal  : AL lib: alc_initconfig: Initializing library v1.19.1-6761218e51699f46bf25c377e65b3e9ea5e434b9 openal-soft-1.19.1
12-04 06:07:52.963 17114 17138 D openal  : AL lib: alc_initconfig: Supported backends: opensl, null, wave
12-04 06:07:52.964 17114 17138 D openal  : AL lib: ReadALConfig: Loading config /etc/openal/alsoft.conf...
12-04 06:07:52.964 17114 17138 D openal  : AL lib: ReadALConfig: Loading config /etc/xdg/alsoft.conf...
12-04 06:07:52.964 17114 17138 D openal  : AL lib: GetProcBinary: Got path: /system/bin
12-04 06:07:52.964 17114 17138 D openal  : AL lib: ReadALConfig: Loading config /system/bin/alsoft.conf...
12-04 06:07:52.964 17114 17138 D openal  : AL lib: GetConfigValue: Key disable-cpu-exts not found
12-04 06:07:52.964 17114 17138 D openal  : AL lib: FillCPUCaps: Got features string:fp asimd evtstrm aes pmull sha1 sha2 crc32
12-04 06:07:52.964 17114 17138 D openal  : 
12-04 06:07:52.964 17114 17138 D openal  : AL lib: FillCPUCaps: Extensions: -NEON
12-04 06:07:52.964 17114 17138 D openal  : AL lib: GetConfigValue: Key rt-prio not found
12-04 06:07:52.964 17114 17138 D openal  : AL lib: GetConfigValue: Key resampler not found
12-04 06:07:52.964 17114 17138 D openal  : AL lib: GetConfigValue: Key trap-al-error not found
12-04 06:07:52.964 17114 17138 D openal  : AL lib: GetConfigValue: Key trap-alc-error not found
12-04 06:07:52.964 17114 17138 D openal  : AL lib: GetConfigValue: Key reverb/boost not found
12-04 06:07:52.964 17114 17138 D openal  : AL lib: GetConfigValue: Key drivers not found
12-04 06:07:52.964 17114 17138 D openal  : AL lib: alc_initconfig: Initialized backend "opensl"
12-04 06:07:52.964 17114 17138 D openal  : AL lib: alc_initconfig: Added "opensl" for playback
12-04 06:07:52.964 17114 17138 D openal  : AL lib: alc_initconfig: Added "opensl" for capture
12-04 06:07:52.964 17114 17138 D openal  : AL lib: GetConfigValue: Key excludefx not found
12-04 06:07:52.965 17114 17138 D openal  : AL lib: GetConfigValue: Key default-reverb not found
12-04 06:07:52.965 17114 17138 D openal  : AL lib: GetConfigValue: Key channels not found
12-04 06:07:52.965 17114 17138 D openal  : AL lib: GetConfigValue: Key sample-type not found
12-04 06:07:52.965 17114 17138 D openal  : AL lib: GetConfigValue: Key frequency not found
12-04 06:07:52.965 17114 17138 D openal  : AL lib: GetConfigValue: Key periods not found
12-04 06:07:52.965 17114 17138 D openal  : AL lib: GetConfigValue: Key period_size not found
12-04 06:07:52.965 17114 17138 D openal  : AL lib: GetConfigValue: Key sources not found
12-04 06:07:52.965 17114 17138 D openal  : AL lib: GetConfigValue: Key slots not found
12-04 06:07:52.965 17114 17138 D openal  : AL lib: GetConfigValue: Key sends not found
12-04 06:07:52.967 17114 17138 D openal  : AL lib: GetConfigValue: Key ambi-format not found
12-04 06:07:52.967 17114 17138 D openal  : AL lib: alcOpenDevice: Created device 0x75e24b5000, "OpenSL"
12-04 06:07:52.968 17114 17138 D openal  : AL lib: UpdateDeviceParams: ALC_MAX_AUXILIARY_SENDS = 64
12-04 06:07:52.968 17114 17138 D openal  : AL lib: GetConfigValue: Key frequency not found
12-04 06:07:52.968 17114 17138 D openal  : AL lib: GetConfigValue: Key sources not found
12-04 06:07:52.968 17114 17138 D openal  : AL lib: GetConfigValue: Key sends not found
12-04 06:07:52.968 17114 17138 D openal  : AL lib: GetConfigValue: Key hrtf not found
12-04 06:07:52.968 17114 17138 D openal  : AL lib: UpdateDeviceParams: Pre-reset: Stereo, Float, 44100hz, 1024 update size x3
12-04 06:07:52.972 17114 17138 I libOpenSLES: Emulating old channel mask behavior (ignoring positional mask 0x3, using default mask 0x3 based on channel count of 2)
12-04 06:07:52.978 17114 17138 D openal  : AL lib: UpdateDeviceParams: Post-reset: Stereo, Signed Short, 44100hz, 1024 update size x3
12-04 06:07:52.978 17114 17138 D openal  : AL lib: GetConfigValue: Key stereo-mode not found
12-04 06:07:52.978 17114 17138 D openal  : AL lib: aluInitRenderer: HRTF disabled
12-04 06:07:52.978 17114 17138 D openal  : AL lib: GetConfigValue: Key cf_level not found
12-04 06:07:52.978 17114 17138 D openal  : AL lib: aluInitRenderer: BS2B disabled
12-04 06:07:52.978 17114 17138 D openal  : AL lib: GetConfigValue: Key stereo-encoding not found
12-04 06:07:52.978 17114 17138 D openal  : AL lib: aluInitRenderer: UHJ disabled
12-04 06:07:52.978 17114 17138 D openal  : AL lib: UpdateDeviceParams: Channel config, Dry: 2, FOA: 0, Real: 0
12-04 06:07:52.978 17114 17138 D openal  : AL lib: UpdateDeviceParams: Allocating 2 channels, 16384 bytes
12-04 06:07:52.978 17114 17138 D openal  : AL lib: UpdateDeviceParams: Max sources: 256 (255 + 1), effect slots: 64, sends: 16
12-04 06:07:52.978 17114 17138 D openal  : AL lib: GetConfigValue: Key dither not found
12-04 06:07:52.978 17114 17138 D openal  : AL lib: GetConfigValue: Key dither-depth not found
12-04 06:07:52.978 17114 17138 D openal  : AL lib: UpdateDeviceParams: Dithering enabled (16-bit, 32768)
12-04 06:07:52.978 17114 17138 D openal  : AL lib: GetConfigValue: Key output-limiter not found
12-04 06:07:52.978 17114 17138 D openal  : AL lib: UpdateDeviceParams: Output limiter enabled
12-04 06:07:52.978 17114 17138 D openal  : AL lib: UpdateDeviceParams: Fixed device latency: 997732ns
12-04 06:07:52.993 17114 17138 D openal  : AL lib: GetConfigValue: Key volume-adjust not found
12-04 06:07:52.993 17114 17138 D openal  : AL lib: alcCreateContext: Created context 0x75e246a280
12-04 06:07:53.102 17114 17138 D openal  : AL lib: alcCaptureOpenDevice: Capture format: Mono, Signed Short, 8000hz, 10000 update size x1
12-04 06:07:53.102 17114 17138 W libOpenSLES: Conversion from OpenSL ES positional channel mask 0x4 to Android mask 0 loses channels
12-04 06:07:53.102 17114 17138 I libOpenSLES: Emulating old channel mask behavior (ignoring positional mask 0x4, using default mask 0x10 based on channel count of 1)
12-04 06:07:53.113 17114 17138 W libOpenSLES: Leaving BufferQueue::Enqueue (SL_RESULT_BUFFER_INSUFFICIENT)
12-04 06:07:53.113 17114 17138 E openal  : AL lib: ALCopenslCapture_open: bufferQueue->Enqueue: Buffer insufficient
12-04 06:07:53.118 17114 17138 D openal  : AL lib: FreeDevice: 0x75cc8e7000
12-04 06:07:53.118 17114 17138 W openal  : AL lib: alcSetError: Error generated on device 0x0, code 0xa004

-- main.lua
function love.load()
  local mic_list = love.audio.getRecordingDevices()
  if #mic_list > 0 then
    local mic = mic_list[1] -- There is only one device in mic_list
    print(mic:getName()) -- OpenSL
    print(mic:start(8000)) -- false
  else
    errror('No recording devices found')
  end
end

-- conf.lua
function love.conf(t)
  t.audio.mic = true
end

Comments (2)

  1. Log in to comment