Closed romanbsd closed 4 years ago
Please replace SuperpoweredAndroidAudioIO.cpp with the attached experimental build and let me know the results. SuperpoweredAndroidAudioIO.cpp.zip
Is anybody there?
I'll try it tomorrow
On Tue, Nov 26, 2019, 18:32 Gabor Szanto notifications@github.com wrote:
Is anybody there?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/superpoweredSDK/Low-Latency-Android-iOS-Linux-Windows-tvOS-macOS-Interactive-Audio-Platform/issues/604?email_source=notifications&email_token=AAAMD7H6MTWNOTEJ2WTFBE3QVVFSFA5CNFSM4JPULUO2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEFGUCAI#issuecomment-558711041, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAMD7HLT6HPOICFHIGM7W3QVVFSFANCNFSM4JPULUOQ .
Tomorrow?
Sorry, I got busy with other things. Yes, tomorrow I'll get to it.
Tested. Same thing. Also, the new version uses AAudio, so might be not exactly apples to apples. I suspect that you have some internal buffers that add to latency.
No, there are no internal buffering at all. You can check the source, it's open.
What are the input and output stream type settings? AAudio is used only if:
But I assume that there has to be some buffer since the callbacks arrive in different times? I'll try it later on a blank slate project.
All buffers are coming from the operating system. There is no additional buffering.
Are you still working on this?
No, sorry. Too busy with other stuff :(
No worries, i will close this now and when you have time you can comment.
I'm creating an instance of SuperpoweredAndroidAudioIO:
Where inputStreamType is either SL_ANDROID_RECORDING_PRESET_VOICE_RECOGNITION or SL_ANDROID_RECORDING_PRESET_UNPROCESSED, and sampleRate and bufferSize are those returned by AudioManager in Java.
In the callback I'm writing both the produced audio and received samples. When I open the audio in Sonic Visualiser, there's a 200ms delay between samples sent to speaker and received from microphone.
SuperpoweredLatency reports 44ms latency.
I tried using oboe with the same settings and the samples recorded in this scenario show ~40ms latency (just as SuperpoweredLatency predicted).
What might be the reason for such huge delay?
P.S. Only OpenSLES was evaluated, AAudio wasn't used.