SuperPlayer - The DSP_Engine (CamillaDSP) samplerate switching & ESP32 remote control

SuperPlayer - The DSP_Engine (CamillaDSP) samplerate switching & ESP32 remote control

:cop: Thread title changed at member's request.

Hey all!

As i feel guilty filling Henrik's amazing CamillaDSP thread with my stuff i am opening this thread to use for this SuperPlayer i hacked and created "howto's" for.
When i did this hack, and decided to make auto sample rate switching possible for my squeezelite/camilladsp combo, i didn't throught it would be as of any interest... But i was wrong, there seem to be a lot of people out there using it, part of it or whatever, cool... I'am really glad to contribute.

Lykkedk (Jesper Lykke) * GitHub

I have three repositories, the original SuperPlayer and a SuperPlayer v2 for upgrading the SuperPlayer to newer versions of CamillaDSP.
Along with that i have a fork of squeezelite, with the hack i did in the [Master] branch

I AM NOT at all any guru into programming or Linux, but been using it on and off for many years i know my way around it a bit through :)

  • Also i am not allway's fast at reply's... so hoping everyone contribute here.

I hope this thread will be usefull, welcome!

Jesper.
 
Last edited:
And to fill in with some real content from the discussion at Henrik's CamillaDSP-thread:


I suspect that the -v option for "Visualiser support" in squeezelite, has to do with providing data for the VU-meter in the Jivelite GUI. I vill try to check that.
 
And to fill in with some real content from the discussion at Henrik's CamillaDSP-thread:


I suspect that the -v option for "Visualiser support" in squeezelite, has to do with providing data for the VU-meter in the Jivelite GUI. I vill try to check that.

Here is a version built with what you need. Just tested on DietPi but should also work on PCP. All I did was add -DVISEXPORT to the first line of the rpi makefile and built it.

Jesper, I hope you don't mind but I think you should note the source location in case someone wants to try and build it. Its working now with the latest Squeezelite build 1.9.7 1278.


viz : GitHub - ralph-irving/squeezelite: Lightweight headless squeezebox player for Logitech Media Server


Also attached is your Hacked_squeezelite.zip archive which contains the modified output_alsa.c and Makefile.rpi.
 

Attachments

  • Hacked_squeezelite.zip
    74.3 KB · Views: 170
  • squeezelite-custom.zip
    67.7 KB · Views: 191
Last edited:
In case someone wants to setup their own build environment on DietPi :

```
Code:
[B]git clone [url]https://github.com/ralph-irving/squeezelite.git][/url][/B]
if git is not installed : 
[B]sudo apt-get install git[/B]
[B]sudo apt-get install build-essential
sudo apt-get install libssl-dev[/B]
```
 
Last edited:
wineds;

Jesper, I hope you don't mind but I think you should note the source location in case someone wants to try and build it. Its working now with the latest Squeezelite build 1.9.7 1278.

I will eventually "clone" the repos, as Henrik suggested some time ago, but as i wrote in Camilla thread i'am not there yet.
Or do you mean otherwise?

Good day.

Jesper.
 
Thanks wineds..!

I now have a Rpi setup for building, and just started to dive in to the code. Your example verified my guesses of where to put Jesper's code.

But I did cut the corner and tested your squeezelite.
Unfortunately - Nice try, but no cigar...

Your version also lacks support for the -v option, and can't be started by cPC. :scratch1:
 
Last edited:
I now have a Rpi setup for building, and just started to dive in to the code. Your example verified my guesses of where to put Jesper's code.

I think the code should start at line ~352

I actually created a new buildmachine yesterday, but did not try it.
Eventually i can try when i get back home from work.

I think i can build it with thoose build options without the ones in RED:
LINUX ALSA EVENTFD RESAMPLE FFMPEG OPUS VISEXPORT IR GPIO RPI DSD SSL NO_SSLSYM

Should i give it a try guy's ???

EDIT --> See also this post : https://www.diyaudio.com/forums/pc-...crossovers-correction-etc-43.html#post6215420

Jesper.
 
Last edited:
Maybe eventually...

Meanwhile I get errors...
I followed this instruction to install build environment:
Build Squeezelite
I just cloned git, and tried to build with unmodified Makefile.rpi.
This came out:

Code:
cc -Wall -fPIC -O2 -fcommon  -DOPUS -DALAC -DRESAMPLE -DVISEXPORT -DDSD -DIR -DGPIO -DRPI -DUSE_SSL -DLINKALL -I./include -I./include/opus -I./include/alac -I/usr/local/include -s -march=armv6 -mfloat-abi=hard -mfpu=vfp stream.c -c -o stream.o
stream.c:31:10: fatal error: openssl/ssl.h: Filen eller katalogen finns inte
 #include "openssl/ssl.h"
         ^~~~~~~~~~~~~~~
compilation terminated.
Removing -DUSE_SSL:
Code:
g++  -Wall -fPIC -O2 -fcommon  -DOPUS -DALAC -DRESAMPLE -DVISEXPORT -DDSD -DIR -DGPIO -DRPI -DLINKALL -I./include -I./include/opus -I./include/alac -I/usr/local/include -s -march=armv6 -mfloat-abi=hard -mfpu=vfp -Wno-multichar alac_wrapper.cpp -c -o alac_wrapper.o
alac_wrapper.cpp:23:10: fatal error: ALACDecoder.h: Filen eller katalogen finns inte
 #include "ALACDecoder.h"
          ^~~~~~~~~~~~~~~
compilation terminated.
And removing -DALAC:
Code:
pus -I./include/alac -I/usr/local/include -s -march=armv6 -mfloat-abi=hard -mfpu=vfp opus.c -c -o opus.o
opus.c:44:10: fatal error: opusfile.h: Filen eller katalogen finns inte
 #include <opusfile.h>
          ^~~~~~~~~~~~
compilation terminated.
And removing -DOPUS:
Code:
cc main.o slimproto.o buffer.o stream.o utils.o output.o output_alsa.o output_pa.o output_stdout.o output_pack.o output_pulse.o decode.o flac.o pcm.o mad.o vorbis.o mpg.o dsd.o dop.o dsd2pcm/dsd2pcm.o process.o resample.o output_vis.o ir.o gpio.o minimal_gpio.o faad.o -L./lib -L/usr/local/lib -s -lgomp -lpthread -lm -lrt -lmad -lmpg123 -lFLAC -lvorbisfile -lvorbis -logg -lsoxr -llirc_client -lfaad -lasound -o squeezelite
/usr/bin/ld: resample.o: undefined reference to symbol 'dlopen@@GLIBC_2.4'
/usr/bin/ld: //lib/arm-linux-gnueabihf/libdl.so.2: error adding symbols: DSO saknas från kommandoraden
collect2: error: ld returned 1 exit status
make: *** [Makefile:153: squeezelite] Fel 1
and so on...
Not supposed to work out of the box..?
 
I just build a version, with thoose build options:
LINUX ALSA EVENTFD RESAMPLE VISEXPORT IR GPIO RPI DSD SSL NO_SSLSYM
And it's the newest one:
Squeezelite v1.9.7-1278

The makefile is like this:
OPTS = -DRESAMPLE -DVISEXPORT -DDSD -DIR -DGPIO -DRPI -DUSE_SSL -DNO_SSLSYM -I./include -I./include/opus -I./include/alac -I/usr/local/include -s -march=armv6 -mfloat-abi=hard -mfpu=vfp

LDFLAGS=-L./lib -L/usr/local/lib -s -lgomp

include Makefile

Also i forke'd the original squeezelite repos.
GitHub - Lykkedk/squeezelite: Lightweight headless squeezebox player for Logitech Media Server

The changes i did in the code & Makefile.rpi are in the [master] branch.

Only catch.... I did not test the binary squeezelite yet :eek::eek::eek:

Jesper.
 

Attachments

  • squeezelite.zip
    68.9 KB · Views: 122