quiet/org.quietmodem.Quiet

opensl error code=0002

setyongr opened this issue · 7 comments

Hi, i was trying QuietShare sample app on my phone, but when i open it, it show
error org.quietmodem.Quiet.ModemException: failed to initialize opensl recorder, opensl error code=0002

and on the logcat it show

11-20 15:54:59.759 31803-31843/no.birkett.quietshare E/libOpenSLES: Cannot create AudioRecorder: data sink must be in PCM format
11-20 15:54:59.759 31803-31843/no.birkett.quietshare E/libOpenSLES: Cannot create AudioRecorder: invalid source or sink
11-20 15:54:59.759 31803-31843/no.birkett.quietshare W/libOpenSLES: Leaving Engine::CreateAudioRecorder (SL_RESULT_PARAMETER_INVAL

i run on my Xiaomi Redmi 3 Pro with Cortex-A53 CPU and Android 5.1.1

Hi @setyongr,

Thanks for trying Quiet, and sorry to hear you're having troubles with it.

I have an idea about what's causing this bug, but I haven't been able to reproduce it on Android 5.1.0 in the simulator. I pushed a commit just now that disables an extension. Can you pull the latest HEAD of org.quietmodem.Quiet and try again, and let me know the result? If this change works then I can work on more correctly determining at runtime whether this extension is supported, and disable it if not. And if it doesn't work then I'll try to think of what else it could be :)

Hi @setyongr

Have you had a chance to try with the latest commit in this repo? I'm curious to know if that fixes your bug.

hi @brian-armstrong
thank for reply, and sorry for very late replying back.
the error gone on latest commit but i still cannot receive the text
on logcat it show

12-10 02:57:19.694 5614-7932/no.birkett.quietshare W/AudioRecord: AUDIO_INPUT_FLAG_FAST denied by client

@setyongr

I'm glad you came back and tried again. It's interesting to me that that change fixed your error, I wasn't sure it would have.

You can safely ignore that warning you posted. I'm not sure what issues that but it seems it always prints.

Can you share more about which profile you're tried sending with? And are you attempting to send between two phones on that profile?

@brian-armstrong
i'm trying to use audible and ultrasonic profile between two phone.

Transmitter work perfectly, i was able to transmit data from phone to quiet-js with audible and ultrasonic profile.

Only receiver on the phone that didn't work

@setyongr
Just to confirm, can you be sure the app has the microphone permission? I think it would crash without it anyway, but I'd like to be sure.

When you say it works with quiet-js, do you mean quiet-js running on a computer or another phone?

I'll try to come up with some ideas for why it isn't working. Every phone is a little different so it's hard to guess without seeing it in person, but I'll see what I can think of

@brian-armstrong
sorry i have abandoned this issue. it have microphone permission and quiet-js running on a computer.
I've noticed that this project has been updated and i will try it again and give report if it already work on my device