capacitor-community / capacitor-community/native-audio
Load multiple audio files at the same time
- Dominant language
- Java
- Stars
- 154
- Forks
- 78
- PR merge metrics
- No merged PRs in 30d
Description
**Describe the bug**
On Android, calling multiple NativeAudio.preload(...) one after the other works like a charm. However, on iOS there is a native error that crashes the app. They need to be loaded and awaited 1 by 1.
**To Reproduce**
Steps to reproduce the behavior:
1. Preload 5 audio files one after the other on iOS
**Expected behavior**
It shouldn't crash.
**Desktop (please complete the following information):**
- OS: iOS
**Smartphone (please complete the following information):**
- Device: emulator iphone 16
- OS: iOS 8.4
- Browser safari
Here is the error I am seeing in XCode NativeAudio.preloadAsset(_:isComplex:)
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSTaggedDate count]: unrecognized selector sent to instance 0x8000000000000000'
Contributor guide
Research direction
Start at the NativeAudio.preload(...) entry point and the iOS NativeAudio.preloadAsset(_:isComplex:) path mentioned in the XCode error. Reproduce preloading five audio files one after another on the reported iOS setup, then verify that all files load without the native exception or an app crash.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ios
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100