Low-Latency-Android-iOS-Linux-Windows-tvOS-macOS-Interactive-Audio-Platform icon indicating copy to clipboard operation
Low-Latency-Android-iOS-Linux-Windows-tvOS-macOS-Interactive-Audio-Platform copied to clipboard

Low sample rate mp3 file can be processed on Android but not on Linux

Open tjmorgan0 opened this issue 3 years ago • 5 comments

We have an implementation on Android and Linux using the SuperpoweredAdvancedAudioPlayer. We received a low sample rate file from a customer that can be opened and decoded on Android but fails on Linux. If we resample the file to a higher bit rate it isn't a problem.

We're using the latest release of the Linux libraries, 2.5.1.

I can provide the file but GitHub won't let me attache an mp3 file.

tjmorgan0 avatar Aug 05 '22 15:08 tjmorgan0

The decoding capabilities and source code of Superpowered on Android and Linux are identical, so theoretically this shouldn't happen. How exactly does it fail on Linux, at which API call?

gaborszanto avatar Aug 05 '22 16:08 gaborszanto

It fails when opening the file after mainPlayer->open(mainPlayerMedia, NULL, true); and returns Superpowered::AdvancedAudioPlayer::PlayerEvent_OpenFailed from mainPlayer->getLatestEvent();

The specific error data is "PlayerEvent_OpenFailed 1005: Unknown file format".

tjmorgan0 avatar Aug 05 '22 17:08 tjmorgan0

The only difference between Android and Linux is how the file is accessed, in some cases. Are you simply loading a path?

gaborszanto avatar Aug 07 '22 06:08 gaborszanto

Yes, it's a complete file path like the following: /data/Development/MediaManager/Media/01ed15cbad345499f109bd8a6577f970.mp3

Our devices open millions of files per day. The only issues we've seen are from a couple of low bit rate files.

tjmorgan0 avatar Aug 08 '22 17:08 tjmorgan0

Low bitrate and/or low sample rate? Please note that Superpowered can decode MP3 Layer 3 files only, and that specification has 44100 Hz minimum sample rate, so if the file has a lower sample rate, than it's not Layer 3, but Layer 2.

gaborszanto avatar Aug 12 '22 15:08 gaborszanto

Closing as there is no further input from the user.

ivannador avatar Oct 06 '22 14:10 ivannador