Latest BASS on Android + DSD Playback

Started by elan,

elan

We upgraded from: v2.4.17.0 to v2.4.17.42 to attempt to fix a crash we were seeing around FLAC-in-MP4. That crash does appear to be fixed now, but we're seeing something rather strange. When attempting to play DSD content, instead of using the DSD plug-in, it's falling back to using the Opus plugin we're registering.

LoadPlugin("OPUS", (char* )&BASSOpusplugin, BASS_PLUGIN_PROC);

...

Loaded OPUS plug-in version 1.0.0.0 (Opus *.opus;)
Loaded DSD plug-in version 2.4.1.3 (Direct Stream Digital *.dff;*.dsf;)

Any ideas?

elan

It looks like this affects M4A files with AAC inside as well, according to a report (and log) from another user.

Ian @ un4seen

When a file cannot be handled by BASS's built-in decoders, it'll try the plugins in the order that they're provided via BASS_LoadPlugin, and then the OS's decoders. In your case, it sounds like your Opus plugin's STREAMCREATEPROC function isn't first checking that the file contains playable data? It should fail with a BASS_ERROR_FILEFORM error when it can't handle a file, which tells BASS to try the other plugins and the OS's decoders.

elan


elan

And just wanted to add, it did work as-is (returning 0 instead of setting BASS_ERROR_FILEFORM) with BASS v2.4.17.0, so I suspect something changed in the interim in terms of the behavior, in case that's interesting.