Author Topic: BASS for ARM Linux  (Read 227529 times)

Ian @ un4seen

  • Administrator
  • Posts: 22761
Re: BASS for ARM Linux
« Reply #400 on: 20 Mar '20 - 16:31 »
The ARM Linux version of the BASSmix 2.4.10 release is up now in the 1st post.

Jan Rzepiszczak

  • Guest
BASS for ARM Linux
« Reply #401 on: 9 Jul '20 - 21:17 »
Hey,

I'm trying to write a program that will be playing music from the queue. Songs are in Matroska/WebM format. On Windows, there is no problem with playing it but when I try to create a stream on Raspberry Pi 4 I'm getting error "BASS_ERROR_FILEFORM". In theory, WebM should be played on Pi without problems.

Here is sample of my code
Code: [Select]
if (!Bass.BASS_Init(-1, 44100, BASSInit.BASS_DEVICE_DEFAULT, IntPtr.Zero))
{
    throw new BassException("Bass library throw an error while initialization", Bass.BASS_ErrorGetCode());
}
_currentStream = Bass.BASS_StreamCreateURL(track.Url, 0, BASSFlag.BASS_DEFAULT, null, IntPtr.Zero);

The URL of a track I'm normally getting from YoutubeExplode, but here is one of track that I tried to play (I used BASS_StreamCreateFile method obviously):
https://mega.nz/file/L0kmgS7L#hAcNeKQuabexlJTyP57pKh6SUY0pK6uubLCKNxDg-G4

When I'm invoking Bass.SupportedStreamExtensions I'm getting *.mp3;*.ogg;*.wav;*.mp2;*.mp1;*.aiff;*.m2a;*.mpa;*.m1a;*.mpg;*.mpeg;*.aif;*.mp3pro;*.bwf;*.mus.

It is possible to play this format on Raspberry Pi?

Ian @ un4seen

  • Administrator
  • Posts: 22761
Re: BASS for ARM Linux
« Reply #402 on: 10 Jul '20 - 13:15 »
You will need the BASSWEBM and BASSOPUS add-ons to play that file. You can use BASS_PluginLoad to load them, like this:

Code: [Select]
Bass.BASS_PluginLoad("libbassopus.so");
Bass.BASS_PluginLoad("libbasswebm.so");

Please see the BASS_PluginLoad documentation for details.

Jan Rzepiszczak

  • Guest
BASS for ARM Linux
« Reply #403 on: 10 Jul '20 - 17:12 »
I've tried loading the libraries before but always got the BASS_ERROR_FILEOPEN error (if I tried on Windows I got the BASS_ERROR_FILEFORM error). However, if I started the compiled program instead of dotnet through mono I was able to load plugins. The problem, however, is that mono does not work with other libraries that I use, which is why I am forced to use dotnet (my program is targeting the net.core 3.1 framework)

Ian @ un4seen

  • Administrator
  • Posts: 22761
Re: BASS for ARM Linux
« Reply #404 on: 10 Jul '20 - 17:37 »
BASS_ERROR_FILEOPEN sounds like it was unable to find the add-ons. You could try providing the full path to them in the BASS_PluginLoad calls. BASS.Net also has a BASS_PluginLoadDirectory method that you could try (to load all add-ons in a directory).

Jan Rzepiszczak

  • Guest
Re: BASS for ARM Linux
« Reply #405 on: 10 Jul '20 - 18:07 »
I tried both options and both gave me the same results. I think it's finding libraries because if i tried load by
Code: [Select]
Bass.BASS_PluginLoadDirectory("./plugins");
for example libbassenc.so i enden with "Segmentation fault".
When I'm trying to load opus and webm libs by BASS_PluginLoadDirectory i'm getting null.