AO2-Client icon indicating copy to clipboard operation
AO2-Client copied to clipboard

Replace BASS audio library with an open source alternative

Open likeawindrammer opened this issue 4 years ago • 8 comments

BASS works well, but it's closed source so it probably worth looking a good open source alternative. The first attempt was with Qt Multimedia but it didn't support opus well enough, later support for playing midi files was added but Qt Multimedia doesn't support that at all (plugins seem to exist), because of that and just general lack of maintenance lead to the complete removal of optional support for Qt Multimedia.

The requirements for an alternative would be:

  • Open Source
  • A developer willing to maintain it
  • Good support for Opus, MP3, Vorbis (Ogg), LPCM/PCM (WAV) and MIDI
  • Support for streaming by http/https
  • Low latency for sound effects
  • Support for: Windows, Linux, Mac and Android

likeawindrammer avatar Dec 11 '21 17:12 likeawindrammer

This might be promising. http://sol.gfxile.net/soloud/

oldmud0 avatar Dec 14 '21 19:12 oldmud0

This might be promising. http://sol.gfxile.net/soloud/

SoLoud:

  • [x] Open Source
  • [ ] Opus (No support for opus)
  • [x] MP3
  • [x] Vorbis (Ogg)
  • [x] LPCM/PCM (WAV)
  • [x] MIDI
  • [ ] Support for streaming by http/https (no built-in support for this)
  • [ ] Low latency for sound effects (Maybe? Needs testing)
  • [x] Windows
  • [x] Linux
  • [x] Mac
  • [x] Android

extra points:

  • [x] Emscripten
  • [x] FLAC

likeawindrammer avatar Dec 15 '21 00:12 likeawindrammer

I reviewed the library. Don't like it. Decoding depends on single file libraries which don't seem to have enough attention by the community to identify security issues or maintain the library if their author decides to stop maintaining. It is probably easy to fork it to use reliable third-party libraries instead, but then I would have to maintain the library myself.

oldmud0 avatar Dec 15 '21 02:12 oldmud0

I'm more concerned with audio mixing than I am with loading audio.

oldmud0 avatar Jan 20 '22 02:01 oldmud0

Related to @sus-impost0r's suggestion around FFmpeg, Qt Multimedia now has an FFmpeg backend since Qt 6.4 (released today). export QT_MEDIA_BACKEND=ffmpeg https://doc-snapshots.qt.io/qt6-6.4/qtmultimedia-index.html#target-platform-and-backend-notes

likeawindrammer avatar Sep 29 '22 18:09 likeawindrammer

+1 for going to QtMultimedia if the backend proves to be versatile enough to replace BASS. Keeping ourselves to a low amount of external dependencies outside of Qt makes deployment and maintaining the client easier.

Salanto avatar Sep 29 '22 20:09 Salanto