Comments (3)
Sorry for the delay on this one. Unfortunately I was unable to replicate this. I tried using the "Pixel 2 XL API 27" emulator and it works fine here. However, I've pushed a potential fix to the dev branch. Are you able to give that a try without your MA_NO_AAUDIO
workaround?
from miniaudio.
I also tried the "Pixel 2 XL API 27" emulator without any problems!
I tried with your updated dev branch and also by patching miniaudio.h
in the master branch with your latest commit.
No more crashes on void ma_device__read_frames_from_client
, but got a different one:
log
I/flutter (20962): [FINEST] flutter_soloud.SoLoud: _initEngine() called
D/miniaudio(20962): DEBUG: WASAPI backend is disabled.
D/miniaudio(20962): DEBUG: DirectSound backend is disabled.
D/miniaudio(20962): DEBUG: WinMM backend is disabled.
D/miniaudio(20962): DEBUG: Core Audio backend is disabled.
D/miniaudio(20962): DEBUG: sndio backend is disabled.
D/miniaudio(20962): DEBUG: audio(4) backend is disabled.
D/miniaudio(20962): DEBUG: OSS backend is disabled.
D/miniaudio(20962): DEBUG: PulseAudio backend is disabled.
D/miniaudio(20962): DEBUG: ALSA backend is disabled.
D/miniaudio(20962): DEBUG: JACK backend is disabled.
D/miniaudio(20962): DEBUG: Attempting to initialize AAudio backend...
D/miniaudio(20962): DEBUG: Loading library: libaaudio.so
D/miniaudio(20962): DEBUG: Loading symbol: AAudio_createStreamBuilder
D/miniaudio(20962): DEBUG: Loading symbol: AAudioStreamBuilder_delete
D/miniaudio(20962): DEBUG: Loading symbol: AAudioStreamBuilder_setDeviceId
D/miniaudio(20962): DEBUG: Loading symbol: AAudioStreamBuilder_setDirection
D/miniaudio(20962): DEBUG: Loading symbol: AAudioStreamBuilder_setSharingMode
D/miniaudio(20962): DEBUG: Loading symbol: AAudioStreamBuilder_setFormat
D/miniaudio(20962): DEBUG: Loading symbol: AAudioStreamBuilder_setChannelCount
D/miniaudio(20962): DEBUG: Loading symbol: AAudioStreamBuilder_setSampleRate
D/miniaudio(20962): DEBUG: Loading symbol: AAudioStreamBuilder_setBufferCapacityInFrames
D/miniaudio(20962): DEBUG: Loading symbol: AAudioStreamBuilder_setFramesPerDataCallback
D/miniaudio(20962): DEBUG: Loading symbol: AAudioStreamBuilder_setDataCallback
D/miniaudio(20962): DEBUG: Loading symbol: AAudioStreamBuilder_setErrorCallback
D/miniaudio(20962): DEBUG: Loading symbol: AAudioStreamBuilder_setPerformanceMode
D/miniaudio(20962): DEBUG: Loading symbol: AAudioStreamBuilder_setUsage
D/miniaudio(20962): DEBUG: Loading symbol: AAudioStreamBuilder_setContentType
D/miniaudio(20962): DEBUG: Loading symbol: AAudioStreamBuilder_setInputPreset
D/miniaudio(20962): DEBUG: Loading symbol: AAudioStreamBuilder_setAllowedCapturePolicy
D/miniaudio(20962): DEBUG: Loading symbol: AAudioStreamBuilder_openStream
D/miniaudio(20962): DEBUG: Loading symbol: AAudioStream_close
D/miniaudio(20962): DEBUG: Loading symbol: AAudioStream_getState
D/miniaudio(20962): DEBUG: Loading symbol: AAudioStream_waitForStateChange
D/miniaudio(20962): DEBUG: Loading symbol: AAudioStream_getFormat
D/miniaudio(20962): DEBUG: Loading symbol: AAudioStream_getChannelCount
D/miniaudio(20962): DEBUG: Loading symbol: AAudioStream_getSampleRate
D/miniaudio(20962): DEBUG: Loading symbol: AAudioStream_getBufferCapacityInFrames
D/miniaudio(20962): DEBUG: Loading symbol: AAudioStream_getFramesPerDataCallback
D/miniaudio(20962): DEBUG: Loading symbol: AAudioStream_getFramesPerBurst
D/miniaudio(20962): DEBUG: Loading symbol: AAudioStream_requestStart
D/miniaudio(20962): DEBUG: Loading symbol: AAudioStream_requestStop
D/miniaudio(20962): DEBUG: System Architecture:
D/miniaudio(20962): DEBUG: Endian: LE
D/miniaudio(20962): DEBUG: SSE2: YES
D/miniaudio(20962): DEBUG: AVX2: NO
D/miniaudio(20962): DEBUG: NEON: NO
I/AAudio (20962): AAudioStreamBuilder_openStream() called ----------------------------------------
I/AudioStreamBuilder(20962): rate = 44100, channels = 2, format = 5, sharing = SH, dir = OUTPUT
I/AudioStreamBuilder(20962): device = 0, sessionId = -1, perfMode = 12, callback: ON with frames = 2048
I/AudioStreamBuilder(20962): usage = 0, contentType = 0, inputPreset = 0, allowedCapturePolicy = 0
D/ (20962): PlayerBase::PlayerBase()
D/AudioStreamTrack(20962): open(), request notificationFrames = 2048, frameCount = 6144
I/AudioTrack(20962): createTrack_l(1105): AUDIO_OUTPUT_FLAG_FAST successful; frameCount 6144 -> 6144
W/AudioStreamTrack(20962): open() flags changed from 0x00000104 to 0x00000004
I/AAudio (20962): AAudioStreamBuilder_openStream() returns 0 = AAUDIO_OK for s#19 ----------------
D/miniaudio(20962): INFO: [AAudio]
D/miniaudio(20962): INFO: (Playback)
D/miniaudio(20962): INFO: Format: 32-bit IEEE Floating Point -> 32-bit IEEE Floating Point
D/miniaudio(20962): INFO: Channels: 2 -> 2
D/miniaudio(20962): INFO: Sample Rate: 44100 -> 44100
D/miniaudio(20962): INFO: Buffer Size: 2048*3 (6144)
D/miniaudio(20962): INFO: Conversion:
D/miniaudio(20962): INFO: Pre Format Conversion: NO
D/miniaudio(20962): INFO: Post Format Conversion: NO
D/miniaudio(20962): INFO: Channel Routing: NO
D/miniaudio(20962): INFO: Resampling: NO
D/miniaudio(20962): INFO: Passthrough: YES
D/miniaudio(20962): INFO: Channel Map In: {CHANNEL_FRONT_LEFT CHANNEL_FRONT_RIGHT}
D/miniaudio(20962): INFO: Channel Map Out: {CHANNEL_FRONT_LEFT CHANNEL_FRONT_RIGHT}
D/AAudio (20962): AAudioStream_requestStart(s#19) called --------------
D/ (20962): PlayerBase::start() from IPlayer
D/AAudio (20962): AAudioStream_requestStart(s#19) returned 0 ---------
D/AudioStreamLegacy(20962): onAudioDeviceUpdate() devId 2 => 2
I/flutter (20962): [FINEST] flutter_soloud.SoLoud: main isolate received: {event:
I/flutter (20962): MessageEvents.initEngine, args: (), return: PlayerErrors.noError (No error)}
I/flutter (20962): [FINEST] flutter_soloud.SoLoud: _startLoop() called
I/flutter (20962): [FINEST] flutter_soloud.SoLoud: main isolate received: {event:
I/flutter (20962): MessageEvents.startLoop, args: (), return: ()}
I/flutter (20962): [FINEST] flutter_soloud.SoLoud: deinit() called
D/AAudio (20962): AAudioStream_close(s#19) called ---------------
E/libc++abi(20962): Pure virtual function called!
F/libc (20962): Fatal signal 6 (SIGABRT), code -1 (SI_QUEUE) in tid 21046 (AudioTrack), pid 20962 (.soloud.example)
*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
Build fingerprint: 'google/sdk_gphone_x86/generic_x86:10/QSR1.210802.001/7603624:userdebug/dev-keys'
Revision: '0'
ABI: 'x86'
Timestamp: 2024-04-29 12:51:13+0200
pid: 20962, tid: 21046, name: AudioTrack >>> flutter.soloud.example <<<
uid: 10151
signal 6 (SIGABRT), code -1 (SI_QUEUE), fault addr --------
Abort message: 'Pure virtual function called!'
eax 00000000 ebx 000051e2 ecx 00005236 edx 00000006
edi e8cc733e esi ad078da0
ebp eb50eef0 esp ad078d48 eip eb50eef9
backtrace:
#00 pc 00000ef9 [vdso] (__kernel_vsyscall+9)
#01 pc 00092328 /apex/com.android.runtime/lib/bionic/libc.so (syscall+40) (BuildId: 471745f0fbbcedb3db1553d5bd6fcd8b)
#02 pc 000ad651 /apex/com.android.runtime/lib/bionic/libc.so (abort+193) (BuildId: 471745f0fbbcedb3db1553d5bd6fcd8b)
#03 pc 0004d107 /system/lib/libc++.so (abort_message+151) (BuildId: da119c8dac8dad63397846fac8d85f56)
#04 pc 00067e03 /system/lib/libc++.so (__cxa_pure_virtual+35) (BuildId: da119c8dac8dad63397846fac8d85f56)
#05 pc 0001c5af /system/lib/libaaudio.so (aaudio::AudioStreamLegacy::processCallbackCommon(int, void*)+559) (BuildId: 763922c0b912534fb5c7a27226c6187a)
#06 pc 0001e55b /system/lib/libaaudio.so (aaudio::AudioStreamTrack::processCallback(int, void*)+59) (BuildId: 763922c0b912534fb5c7a27226c6187a)
#07 pc 0001c177 /system/lib/libaaudio.so (AudioStreamLegacy_callback(int, void*, void*)+39) (BuildId: 763922c0b912534fb5c7a27226c6187a)
#08 pc 0005bc46 /system/lib/libaudioclient.so (android::AudioTrack::processAudioBuffer()+2742) (BuildId: 4a182c5ae196b1b3c87306222ba09430)
#09 pc 0005e448 /system/lib/libaudioclient.so (android::AudioTrack::AudioTrackThread::threadLoop()+184) (BuildId: 4a182c5ae196b1b3c87306222ba09430)
#10 pc 000140fe /system/lib/libutils.so (android::Thread::_threadLoop(void*)+238) (BuildId: 288ba3aff5b46dbd7e74be954af88b83)
#11 pc 000b660b /system/lib/libandroid_runtime.so (android::AndroidRuntime::javaThreadShell(void*)+171) (BuildId: 3643bee2c4fb7899d7781c565843060b)
#12 pc 00013aa6 /system/lib/libutils.so (thread_data_t::trampoline(thread_data_t const*)+246) (BuildId: 288ba3aff5b46dbd7e74be954af88b83)
#13 pc 0011a8e5 /apex/com.android.runtime/lib/bionic/libc.so (__pthread_start(void*)+53) (BuildId: 471745f0fbbcedb3db1553d5bd6fcd8b)
#14 pc 000af6a7 /apex/com.android.runtime/lib/bionic/libc.so (__start_thread+71) (BuildId: 471745f0fbbcedb3db1553d5bd6fcd8b)
Syncing files to device Android SDK built for x86... 55ms
Seems like an AAudio bug on API 10 that doesn't want to close itself if it never got frames delivered or it does not have the time to instantiate the virtual close()
function.
Here an updated brief devices summary:
-
Test NOT passed on:
- emulator - Android 10 API 29
- Xiaomi Mi Max 3 - Android 10 API 29
- Huawei P smart Z - Android 10 API 29
- Xiaomi Mi 6 - Android 9 SDK 28
-
Test passed on:
- emulator - Android 14 API 34
- emulator - Android 13 API 33
- emulator - Android 12L API 32
- emulator - Android 12 API 31
- emulator - Android 11 API 30
- emulator - Android 9 API 28
- emulator - Android 8 API 27
- Samsung Galaxy Note20 Ultra - Android 13 API 33
- Samsung Galaxy Note10+ - Android 12 API 31,32
- Samsung Galaxy S9+ - Android 10 API 29
from miniaudio.
Related Issues (20)
- Android: Build failure of dev branch due to pthread_attr_setinheritsched HOT 2
- WASM duplicate symbol HOT 3
- Emscripten WASM Thread Problem HOT 2
- Question about Attenuation in Miniaudio. HOT 1
- Javascript error after uninitializing miniaudio HOT 4
- "Error: Invalid argument" due to ma_channel_map_is_valid HOT 6
- Does miniaudio support encoding PCM sample data into ADPCM sample data? HOT 1
- Uncaught RuntimeError: memory access out of bounds after starting playing the sound. HOT 8
- DELETED HOT 1
- Miniaudio waiting infinitely when calling ma_engine_uninit HOT 1
- Is there a way to gracefully shut down all threads created by miniaudio when the application exits? HOT 1
- Channel Convert Init Access Violation going from 2 channels to >2 channels HOT 2
- Sound system lags when playing sounds quickly and using delay or reverb HOT 1
- error when compiling on android HOT 1
- "[ALSA] poll() failed" Bug. HOT 1
- Consider ditching ReadFile() in favor of FILE* fread() HOT 2
- Compile error with gcc: `error: invalid conversion from 'UInt32*' {aka 'long unsigned int*'} to 'ma_uint32*' {aka 'unsigned int*'} [-fpermissive]` HOT 8
- [i386] `miniaudio.h:83477:no such instruction: `lzcntl %eax, %ecx'` HOT 2
- How can I Cache ma_sound's into memory? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from miniaudio.