Description
Superpowered version: 2.6.7
Describe the bug
When loading some sources into SuperpoweredDecoder
, decodeAudio
will block indefinitely. I am able to reproduce the issue on numerous Android devices as well as macOS and Linux environments.
I’ve attached a 32KHz / Mono .m4a which exhibits this issue in some of the latest Superpowered samples — the audio was directly exported from the Google Pixel Recorder app.
Steps to Reproduce
- Download the following source: example_recording.m4a.zip
- Replace the
test.m4a
source in the root of theExamples_Linux
directory with the source above - Build the Linux examples with the source above
- Run
offline1
,offline2
andoffline3
examples
Expected behavior
- The Superpowered Linux examples should finish processing or log an error if the file can’t be opened
- If there is an issue decoding,
SuperpoweredDecoder
should return an error code
Actual behavior
decodeAudio
blocks indefinitely and maxes out CPU usage
Device information
As noted above, I have been able to reproduce this issue on numerous Android devices and on macOS & Linux. I’ve attached device information for the Linux device that was used for testing the samples in this repository.
- OS: Ubuntu 22.04.4 LTS (6.5.0-26-generic x86_64)
- CPU: Intel Core i5-4570 CPU @ 3.20GHz
Additional context
Here is the output from afinfo
for the attached source exhibiting the issue:
example_recording.m4a.zip
File: example_recording.m4a
File type ID: mp4f
Num Tracks: 1
----
Data format: 1 ch, 32000 Hz, aac (0x00000000) 0 bits/channel, 0 bytes/packet, 1024 frames/packet, 0 bytes/frame
no channel layout.
estimated duration: 59.358000 sec
audio bytes: 356835
audio packets: 1857
bit rate: 48039 bits per second
packet size upper bound: 285
maximum packet size: 285
audio data file offset: 15816
optimized
audio 1899456 valid frames + 2112 priming + 0 remainder = 1901568
format list:
[ 0] format: 1 ch, 32000 Hz, aac (0x00000000) 0 bits/channel, 0 bytes/packet, 1024 frames/packet, 0 bytes/frame
Channel layout: Mono
The attached source plays as expected in various other players across iOS, Android and macOS, etc.